Skip to content

Commit

Permalink
fbdev: omapfb: Fix tests for platform_get_irq() failure
Browse files Browse the repository at this point in the history
[ Upstream commit acf4c62 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
yuzhenfschina authored and gregkh committed Sep 15, 2022
1 parent cebda5e commit 4b688f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/fbdev/omap/omapfb_main.c
Expand Up @@ -1643,14 +1643,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;
Expand Down

0 comments on commit 4b688f8

Please sign in to comment.