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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;