Commit 9610e08e authored by Fabio Estevam's avatar Fabio Estevam Committed by Jonathan Cameron

iio: mxs-lradc: Propagate the real error code on platform_get_irq() failure

No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 49d916ec
...@@ -1558,7 +1558,7 @@ static int mxs_lradc_probe(struct platform_device *pdev) ...@@ -1558,7 +1558,7 @@ static int mxs_lradc_probe(struct platform_device *pdev)
for (i = 0; i < of_cfg->irq_count; i++) { for (i = 0; i < of_cfg->irq_count; i++) {
lradc->irq[i] = platform_get_irq(pdev, i); lradc->irq[i] = platform_get_irq(pdev, i);
if (lradc->irq[i] < 0) if (lradc->irq[i] < 0)
return -EINVAL; return lradc->irq[i];
ret = devm_request_irq(dev, lradc->irq[i], ret = devm_request_irq(dev, lradc->irq[i],
mxs_lradc_handle_irq, 0, mxs_lradc_handle_irq, 0,
......
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