From: Krzysztof Kozlowski Date: Thu, 27 Aug 2020 07:11:07 +0000 (+0200) Subject: drm/tve200: Fix handling of platform_get_irq() error X-Git-Tag: io_uring-5.11-2020-12-23~116^2~15^2~37 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=77bb5aaf2bb8180e7d1bb70b4df306f511707a7d;p=linux-2.6-block.git drm/tve200: Fix handling of platform_get_irq() error platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200") Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200827071107.27429-2-krzk@kernel.org --- diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index c3aa39bd38ec..b5259cb1383f 100644 --- a/drivers/gpu/drm/tve200/tve200_drv.c +++ b/drivers/gpu/drm/tve200/tve200_drv.c @@ -200,8 +200,8 @@ static int tve200_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (!irq) { - ret = -EINVAL; + if (irq < 0) { + ret = irq; goto clk_disable; }