diff options
author | Yu Zhe <yuzhe@nfschina.com> | 2022-08-12 08:52:23 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-08-24 21:47:08 +0200 |
commit | acf4c6205e862304681234a6a4375b478af12552 (patch) | |
tree | 4a4a704e3f86afe101711d32218f6ba9fdee7d1c /drivers | |
parent | Linux 6.0-rc2 (diff) | |
download | linux-acf4c6205e862304681234a6a4375b478af12552.tar.xz linux-acf4c6205e862304681234a6a4375b478af12552.zip |
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 <yuzhe@nfschina.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fbdev/omap/omapfb_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index dfb4ddc45701..fbb3af883d4d 100644 --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -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; |