Skip to content

Commit 61a97de

Browse files
Ruan JinjieChun-Kuang Hu
authored andcommitted
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 <ruanjinjie@huawei.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/20230803040401.3067484-3-ruanjinjie@huawei.com/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
1 parent 828c912 commit 61a97de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/mediatek/mtk_dpi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,8 +1058,8 @@ static int mtk_dpi_probe(struct platform_device *pdev)
10581058
"Failed to get tvdpll clock\n");
10591059

10601060
dpi->irq = platform_get_irq(pdev, 0);
1061-
if (dpi->irq <= 0)
1062-
return -EINVAL;
1061+
if (dpi->irq < 0)
1062+
return dpi->irq;
10631063

10641064
dpi->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0);
10651065
if (IS_ERR(dpi->next_bridge))

0 commit comments

Comments
 (0)