diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2009-12-13 00:58:13 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2009-12-13 00:58:13 -0700 |
commit | 60f675a12c03c65018beaa1d1ede41557aa60e00 (patch) | |
tree | 7c0f52e1e5f6c7977c9846f468b78e67636c6b95 /drivers/spi | |
parent | 30eaed053c9bced7a23624e4bab5602e5b85124f (diff) | |
download | op-kernel-dev-60f675a12c03c65018beaa1d1ede41557aa60e00.zip op-kernel-dev-60f675a12c03c65018beaa1d1ede41557aa60e00.tar.gz |
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi_imx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 8ffa48c..c96804f 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -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; } |