]> git.baikalelectronics.ru Git - kernel.git/commitdiff
fbdev: omapfb: Fix tests for platform_get_irq() failure
authorYu Zhe <yuzhe@nfschina.com>
Fri, 12 Aug 2022 06:52:23 +0000 (14:52 +0800)
committerHelge Deller <deller@gmx.de>
Wed, 24 Aug 2022 19:47:08 +0000 (21:47 +0200)
The platform_get_irq() returns negative error codes.  It can't actually
return zero.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/omap/omapfb_main.c

index dfb4ddc45701eb0136086e9ec986db1ba20ac6e3..fbb3af883d4df736038b1bedd58903ca22e906fc 100644 (file)
@@ -1642,14 +1642,14 @@ static int omapfb_do_probe(struct platform_device *pdev,
                goto cleanup;
        }
        fbdev->int_irq = platform_get_irq(pdev, 0);
-       if (!fbdev->int_irq) {
+       if (fbdev->int_irq < 0) {
                dev_err(&pdev->dev, "unable to get irq\n");
                r = ENXIO;
                goto cleanup;
        }
 
        fbdev->ext_irq = platform_get_irq(pdev, 1);
-       if (!fbdev->ext_irq) {
+       if (fbdev->ext_irq < 0) {
                dev_err(&pdev->dev, "unable to get irq\n");
                r = ENXIO;
                goto cleanup;