Skip to content

Commit

Permalink
spi-imx: correct check for platform_get_irq failing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Grant Likely committed Dec 13, 2009
1 parent 30eaed0 commit 60f675a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 60f675a

Please sign in to comment.