From: Uwe Kleine-König Date: Sun, 13 Dec 2009 07:58:13 +0000 (-0700) Subject: spi-imx: correct check for platform_get_irq failing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60f675a12c03c65018beaa1d1ede41557aa60e00;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 Signed-off-by: Grant Likely --- diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 8ffa48ce570c..c96804f62052 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; }