Message ID | 20230105083306.1638656-1-nizhen@uniontech.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | drm: msm: Fix error check return value of irq_of_parse_and_map() | expand |
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 89aadd3b3202..3891d9d4a602 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1953,9 +1953,9 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) } msm_host->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); - if (msm_host->irq < 0) { - ret = msm_host->irq; - dev_err(&pdev->dev, "failed to get irq: %d\n", ret); + if (!msm_host->irq) { + ret = -EINVAL; + dev_err(&pdev->dev, "failed to get irq\n"); return ret; }
The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Signed-off-by: Zhen Ni <nizhen@uniontech.com> --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)