Commit 60f675a1 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Grant Likely

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 30eaed05
...@@ -555,7 +555,7 @@ static int __init spi_imx_probe(struct platform_device *pdev) ...@@ -555,7 +555,7 @@ static int __init spi_imx_probe(struct platform_device *pdev)
} }
spi_imx->irq = platform_get_irq(pdev, 0); spi_imx->irq = platform_get_irq(pdev, 0);
if (!spi_imx->irq) { if (spi_imx->irq <= 0) {
ret = -EINVAL; ret = -EINVAL;
goto out_iounmap; goto out_iounmap;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment