drm: msm: Fix error check return value of irq_of_parse_and_map()
PATCH 1/1 drm: msm: Fix error check return value of irq_of_parse_and_map()
The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value.
Signed-off-by Zhen Ni <[email protected]>
--- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/msm/dsi/dsi_host.c +3 -3
@@ -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; }
Signature · 1 line
2.20.1