Skip to content

Commit 6a1d4c7

Browse files
Dan CarpenterAbhinav Kumar
authored andcommitted
drm/msm/dsi: fix irq_of_parse_and_map() error checking
The irq_of_parse_and_map() function returns zero on error. It never returns negative error codes. Fix the check. Fixes: a689554 ("drm/msm: Initial add DSI connector support") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/557715/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
1 parent ab483e3 commit 6a1d4c7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/gpu/drm/msm/dsi/dsi_host.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,10 +1906,9 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
19061906
}
19071907

19081908
msm_host->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
1909-
if (msm_host->irq < 0) {
1910-
ret = msm_host->irq;
1911-
dev_err(&pdev->dev, "failed to get irq: %d\n", ret);
1912-
return ret;
1909+
if (!msm_host->irq) {
1910+
dev_err(&pdev->dev, "failed to get irq\n");
1911+
return -EINVAL;
19131912
}
19141913

19151914
/* do not autoenable, will be enabled later */

0 commit comments

Comments
 (0)