]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
fbdev: omapfb: Do not shadow error code from platform_get_irq()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 18 Oct 2023 03:37:50 +0000 (06:37 +0300)
committerHelge Deller <deller@gmx.de>
Tue, 7 Nov 2023 13:42:34 +0000 (14:42 +0100)
There is no point in shadowing the error codes from platform_get_irq().
Refactor omapfb_do_probe() accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/omap/omapfb_main.c

index 42c96f1cfc93c435ccf94154da2110bae0d4f082..631076bf71f9d89d2a7adbab6f157812000b7b6b 100644 (file)
@@ -1643,17 +1643,16 @@ static int omapfb_do_probe(struct platform_device *pdev,
                r = -ENOMEM;
                goto cleanup;
        }
-       fbdev->int_irq = platform_get_irq(pdev, 0);
-       if (fbdev->int_irq < 0) {
-               r = -ENXIO;
+
+       r = platform_get_irq(pdev, 0);
+       if (r < 0)
                goto cleanup;
-       }
+       fbdev->int_irq = r;
 
-       fbdev->ext_irq = platform_get_irq(pdev, 1);
-       if (fbdev->ext_irq < 0) {
-               r = -ENXIO;
+       r = platform_get_irq(pdev, 1);
+       if (r < 0)
                goto cleanup;
-       }
+       fbdev->ext_irq = r;
 
        init_state++;