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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The irq_of_parse_and_map() function returns 0 on failure, and does not
return an negative value.

Signed-off-by: Zhen Ni <nizhen@xxxxxxxxxxxxx>
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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;
 	}
 
-- 
2.20.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux