aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-10-18 06:37:50 +0300
committerHelge Deller <deller@gmx.de>2023-11-07 14:42:34 +0100
commite89a60ba93c266ee3606adcdd460412c1e7c0924 (patch)
tree85de55dc5857e3767c4df26484fca94e0ce7233a /drivers/video
parentbe3ca57cfb777ad820c6659d52e60bbdd36bf5ff (diff)
downloadlinux-e89a60ba93c266ee3606adcdd460412c1e7c0924.tar.gz
fbdev: omapfb: Do not shadow error code from platform_get_irq()
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap/omapfb_main.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index 42c96f1cfc93c..631076bf71f9d 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -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++;