linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: msm: fix error check return value of irq_of_parse_and_map()
@ 2022-04-22  8:52 cgel.zte
  2022-04-22 10:42 ` Dmitry Baryshkov
  2022-04-22 12:40 ` [PATCH] " AngeloGioacchino Del Regno
  0 siblings, 2 replies; 6+ messages in thread
From: cgel.zte @ 2022-04-22  8:52 UTC (permalink / raw)
  To: robdclark, sean, dmitry.baryshkov
  Cc: quic_abhinavk, airlied, daniel, swboyd, quic_mkrishn,
	angelogioacchino.delregno, vulab, linux-arm-msm, dri-devel,
	freedreno, linux-kernel, Lv Ruyi, Zeal Robot

From: Lv Ruyi <lv.ruyi@zte.com.cn>

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
index 3b92372e7bdf..1fb1ed9e95d9 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
@@ -570,7 +570,7 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev)
 	}
 
 	irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
-	if (irq < 0) {
+	if (!irq) {
 		ret = irq;
 		DRM_DEV_ERROR(&pdev->dev, "failed to get irq: %d\n", ret);
 		goto fail;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-25 22:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22  8:52 [PATCH] drm: msm: fix error check return value of irq_of_parse_and_map() cgel.zte
2022-04-22 10:42 ` Dmitry Baryshkov
2022-04-22 22:40   ` Dmitry Baryshkov
2022-04-24  3:19     ` [PATCH v2] " cgel.zte
2022-04-25 22:23       ` Dmitry Baryshkov
2022-04-22 12:40 ` [PATCH] " AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).