Skip to content

Commit 9509359

Browse files
Lv Ruyilumag
authored andcommitted
drm/msm/dpu: 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 a negative value anyhow, so never enter this conditional branch. Fixes: 25fdd59 ("drm/msm: Add SDM845 DPU support") Reported-by: Zeal Robot <[email protected]> Signed-off-by: Lv Ruyi <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/483291/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 3e9c146 commit 9509359

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,9 +1183,9 @@ static int dpu_kms_init(struct drm_device *ddev)
11831183
priv->kms = &dpu_kms->base;
11841184

11851185
irq = irq_of_parse_and_map(dpu_kms->pdev->dev.of_node, 0);
1186-
if (irq < 0) {
1187-
DPU_ERROR("failed to get irq: %d\n", irq);
1188-
return irq;
1186+
if (!irq) {
1187+
DPU_ERROR("failed to get irq\n");
1188+
return -EINVAL;
11891189
}
11901190
dpu_kms->base.irq = irq;
11911191

0 commit comments

Comments
 (0)