Commit acf4c620 authored by Yu Zhe's avatar Yu Zhe Committed by Helge Deller

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: default avatarYu Zhe <yuzhe@nfschina.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 1c23f9e6
...@@ -1642,14 +1642,14 @@ static int omapfb_do_probe(struct platform_device *pdev, ...@@ -1642,14 +1642,14 @@ static int omapfb_do_probe(struct platform_device *pdev,
goto cleanup; goto cleanup;
} }
fbdev->int_irq = platform_get_irq(pdev, 0); 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"); dev_err(&pdev->dev, "unable to get irq\n");
r = ENXIO; r = ENXIO;
goto cleanup; goto cleanup;
} }
fbdev->ext_irq = platform_get_irq(pdev, 1); 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"); dev_err(&pdev->dev, "unable to get irq\n");
r = ENXIO; r = ENXIO;
goto cleanup; goto cleanup;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment