mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
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>
This commit is contained in:
parent
1c23f9e627
commit
acf4c6205e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user