* [PATCH] fbdev: omap: fix tests for platform_get_irq() failure
@ 2022-08-12 6:52 Yu Zhe
0 siblings, 0 replies; only message in thread
From: Yu Zhe @ 2022-08-12 6:52 UTC (permalink / raw)
To: deller; +Cc: linux-fbdev, linux-omap, liqiong, kernel-janitors, Yu Zhe
The platform_get_irq() returns negative error codes. It can't actually
return zero.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
drivers/video/fbdev/omap/omapfb_main.c | 4 ++--
1 file 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;
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-12 6:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-12 6:52 [PATCH] fbdev: omap: fix tests for platform_get_irq() failure Yu Zhe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).