From 61a97dec5f432cf33e4ac7460b9e02abf031f2c1 Mon Sep 17 00:00:00 2001 From: Ruan Jinjie Date: Thu, 3 Aug 2023 12:04:00 +0800 Subject: [PATCH] drm/mediatek: Do not check for 0 return after calling platform_get_irq() It is not possible for platform_get_irq() to return 0. Use the return value from platform_get_irq(). Signed-off-by: Ruan Jinjie Link: https://patchwork.kernel.org/project/dri-devel/patch/20230803040401.3067484-3-ruanjinjie@huawei.com/ Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_dpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index ad1be4f9150c..df56fbb40ff4 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -1058,8 +1058,8 @@ static int mtk_dpi_probe(struct platform_device *pdev) "Failed to get tvdpll clock\n"); dpi->irq = platform_get_irq(pdev, 0); - if (dpi->irq <= 0) - return -EINVAL; + if (dpi->irq < 0) + return dpi->irq; dpi->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); if (IS_ERR(dpi->next_bridge)) -- 2.34.1