提交 60f675a1 编写于 作者: U Uwe Kleine-König 提交者: 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: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册