提交 b9e4f1d2 编写于 作者: L Lv Ruyi 提交者: Dmitry Baryshkov

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.
Reported-by: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: NLv Ruyi <lv.ruyi@zte.com.cn>
Reviewed-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/483175/
Link: https://lore.kernel.org/r/20220424031959.3172406-1-lv.ruyi@zte.com.cnSigned-off-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org>
上级 14e7b034
...@@ -576,9 +576,9 @@ static int mdp5_kms_init(struct drm_device *dev) ...@@ -576,9 +576,9 @@ static int mdp5_kms_init(struct drm_device *dev)
} }
irq = irq_of_parse_and_map(pdev->dev.of_node, 0); irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
if (irq < 0) { if (!irq) {
ret = irq; ret = -EINVAL;
DRM_DEV_ERROR(&pdev->dev, "failed to get irq: %d\n", ret); DRM_DEV_ERROR(&pdev->dev, "failed to get irq\n");
goto fail; goto fail;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册