提交 8a13fb8c 编写于 作者: L Lv Ruyi 提交者: Zheng Zengkai

drm: msm: fix error check return value of irq_of_parse_and_map()

stable inclusion
from stable-v5.10.121
commit 0325c08ae202da9a33d0d2a948ed3215e9052f00
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0325c08ae202da9a33d0d2a948ed3215e9052f00

--------------------------------

[ Upstream commit b9e4f1d2 ]

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>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 ddf112bc
...@@ -598,9 +598,9 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev) ...@@ -598,9 +598,9 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev)
pdev = mdp5_kms->pdev; pdev = mdp5_kms->pdev;
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.
先完成此消息的编辑!
想要评论请 注册