spi-imx: correct check for platform_get_irq failing

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>
This commit is contained in:
Uwe Kleine-König 2009-12-13 00:58:13 -07:00 committed by Grant Likely
parent 30eaed053c
commit 60f675a12c

View 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;
}