Skip to content

Commit acf4c62

Browse files
yuzhenfschinahdeller
authored andcommitted
fbdev: omapfb: Fix tests for platform_get_irq() failure
The platform_get_irq() returns negative error codes. It can't actually return zero. Signed-off-by: Yu Zhe <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 1c23f9e commit acf4c62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/video/fbdev/omap/omapfb_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,14 +1642,14 @@ static int omapfb_do_probe(struct platform_device *pdev,
16421642
goto cleanup;
16431643
}
16441644
fbdev->int_irq = platform_get_irq(pdev, 0);
1645-
if (!fbdev->int_irq) {
1645+
if (fbdev->int_irq < 0) {
16461646
dev_err(&pdev->dev, "unable to get irq\n");
16471647
r = ENXIO;
16481648
goto cleanup;
16491649
}
16501650

16511651
fbdev->ext_irq = platform_get_irq(pdev, 1);
1652-
if (!fbdev->ext_irq) {
1652+
if (fbdev->ext_irq < 0) {
16531653
dev_err(&pdev->dev, "unable to get irq\n");
16541654
r = ENXIO;
16551655
goto cleanup;

0 commit comments

Comments
 (0)