Skip to content

Commit e89a60b

Browse files
andy-shevhdeller
authored andcommitted
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>
1 parent be3ca57 commit e89a60b

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

drivers/video/fbdev/omap/omapfb_main.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,17 +1643,16 @@ static int omapfb_do_probe(struct platform_device *pdev,
16431643
r = -ENOMEM;
16441644
goto cleanup;
16451645
}
1646-
fbdev->int_irq = platform_get_irq(pdev, 0);
1647-
if (fbdev->int_irq < 0) {
1648-
r = -ENXIO;
1646+
1647+
r = platform_get_irq(pdev, 0);
1648+
if (r < 0)
16491649
goto cleanup;
1650-
}
1650+
fbdev->int_irq = r;
16511651

1652-
fbdev->ext_irq = platform_get_irq(pdev, 1);
1653-
if (fbdev->ext_irq < 0) {
1654-
r = -ENXIO;
1652+
r = platform_get_irq(pdev, 1);
1653+
if (r < 0)
16551654
goto cleanup;
1656-
}
1655+
fbdev->ext_irq = r;
16571656

16581657
init_state++;
16591658

0 commit comments

Comments
 (0)