Skip to contentSkip to conversation

drm: msm: Fix error check return value of irq_of_parse_and_map()

PATCH New Zhen Ni 1 participant 1 message Jan 5, 2023

Subsystems (3)
lore
Share & tools
lore

Zhen Ni

author
#0 lore raw

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.

---
 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
index 89aadd3b3202..3891d9d4a602 100644
@@ -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