mirror of https://gitee.com/openkylin/linux.git
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:
parent
30eaed053c
commit
60f675a12c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue