spi-imx: correct check for platform_get_irq failing
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 13 Dec 2009 07:58:13 +0000 (00:58 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Sun, 13 Dec 2009 07:58:13 +0000 (00:58 -0700)
platform_get_irq returns -ENXIO if there is no entry.  So ensure
return value is greater than zero instead of non-zero.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi_imx.c

index 8ffa48ce570c8eaefecf399f0e139ce0a62a03a8..c96804f6205275673ddf17580e8a6f8d601d2830 100644 (file)
@@ -555,7 +555,7 @@ static int __init spi_imx_probe(struct platform_device *pdev)
        }
 
        spi_imx->irq = platform_get_irq(pdev, 0);
-       if (!spi_imx->irq) {
+       if (spi_imx->irq <= 0) {
                ret = -EINVAL;
                goto out_iounmap;
        }