Skip to contentSkip to conversation

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

PATCH Applied Fabio Estevam 3 participants 3 messages Feb 14, 2014 – Feb 15, 2014

Subsystems (4)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

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

From: Fabio Estevam <[email protected]>

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

Just return the error code itself instead.

---
 drivers/staging/iio/adc/mxs-lradc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/mxs-lradc.c +1 -1
index d304156..ab3c0d4 100644
@@ -1558,7 +1558,7 @@ static int mxs_lradc_probe(struct platform_device *pdev)
 	for (i = 0; i < of_cfg->irq_count; i++) {
 		lradc->irq[i] = platform_get_irq(pdev, i);
 		if (lradc->irq[i] < 0)
-			return -EINVAL;
+			return lradc->irq[i];
 
 		ret = devm_request_irq(dev, lradc->irq[i],
 					mxs_lradc_handle_irq, 0,
Signature · 1 line
1.8.1.2
maintainer Applied
#2 lore raw
Quoted 11 lines · Marek Vasut
Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Just return the error code itself instead.

Applied to the togreg branch of iio.git

Thanks,

Quoted 7 lines

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html