[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220425090947.3498897-1-lv.ruyi@zte.com.cn>
Date: Mon, 25 Apr 2022 09:09:47 +0000
From: cgel.zte@...il.com
To: robdclark@...il.com, sean@...rly.run
Cc: quic_abhinavk@...cinc.com, airlied@...ux.ie, daniel@...ll.ch,
dmitry.baryshkov@...aro.org, swboyd@...omium.org,
bjorn.andersson@...aro.org,
angelogioacchino.delregno@...ainline.org, tiny.windzz@...il.com,
architt@...eaurora.org, jsanka@...eaurora.org,
skolluku@...eaurora.org, ryadav@...eaurora.org,
linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Lv Ruyi <lv.ruyi@....com.cn>, Zeal Robot <zealci@....com.cn>
Subject: [PATCH] drm/msm/dpu: fix error check return value of irq_of_parse_and_map()
From: Lv Ruyi <lv.ruyi@....com.cn>
The irq_of_parse_and_map() function returns 0 on failure, and does not
return a negative value anyhow, so never enter this conditional branch.
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index e29796c4f27b..36eeeae7fe45 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -1187,9 +1187,9 @@ struct msm_kms *dpu_kms_init(struct drm_device *dev)
dpu_kms = to_dpu_kms(priv->kms);
irq = irq_of_parse_and_map(dpu_kms->pdev->dev.of_node, 0);
- if (irq < 0) {
- DPU_ERROR("failed to get irq: %d\n", irq);
- return ERR_PTR(irq);
+ if (!irq) {
+ DPU_ERROR("failed to get irq\n");
+ return ERR_PTR(-EINVAL);
}
dpu_kms->base.irq = irq;
--
2.25.1
Powered by blists - more mailing lists