summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorYu Zhe <yuzhe@nfschina.com>2022-08-12 09:52:23 +0300
committerHelge Deller <deller@gmx.de>2022-08-24 22:47:08 +0300
commitacf4c6205e862304681234a6a4375b478af12552 (patch)
tree4a4a704e3f86afe101711d32218f6ba9fdee7d1c /drivers/video
parent1c23f9e627a7b412978b4e852793c5e3c3efc555 (diff)
downloadlinux-acf4c6205e862304681234a6a4375b478af12552.tar.xz
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/video')
-rw-r--r--drivers/video/fbdev/omap/omapfb_main.c4
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;