* [PATCH] iio: mxs-lradc: Propagate the real error code on platform_get_irq() failure
@ 2014-02-14 3:28 Fabio Estevam
2014-02-14 8:22 ` Marek Vasut
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2014-02-14 3:28 UTC (permalink / raw)
To: jic23; +Cc: marex, linux-iio, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
No need to return a 'fake' return value on platform_get_irq() failure.
Just return the error code itself instead.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/staging/iio/adc/mxs-lradc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index d304156..ab3c0d4 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -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,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: mxs-lradc: Propagate the real error code on platform_get_irq() failure
2014-02-14 3:28 [PATCH] iio: mxs-lradc: Propagate the real error code on platform_get_irq() failure Fabio Estevam
@ 2014-02-14 8:22 ` Marek Vasut
2014-02-15 12:33 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2014-02-14 8:22 UTC (permalink / raw)
To: Fabio Estevam; +Cc: jic23, linux-iio, Fabio Estevam
On Friday, February 14, 2014 at 04:28:35 AM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> No need to return a 'fake' return value on platform_get_irq() failure.
>
> Just return the error code itself instead.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: mxs-lradc: Propagate the real error code on platform_get_irq() failure
2014-02-14 8:22 ` Marek Vasut
@ 2014-02-15 12:33 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2014-02-15 12:33 UTC (permalink / raw)
To: Marek Vasut, Fabio Estevam; +Cc: linux-iio, Fabio Estevam
On 14/02/14 08:22, Marek Vasut wrote:
> On Friday, February 14, 2014 at 04:28:35 AM, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> No need to return a 'fake' return value on platform_get_irq() failure.
>>
>> Just return the error code itself instead.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> Acked-by: Marek Vasut <marex@denx.de>
>
Applied to the togreg branch of iio.git
Thanks,
> Best regards,
> Marek Vasut
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-15 12:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14 3:28 [PATCH] iio: mxs-lradc: Propagate the real error code on platform_get_irq() failure Fabio Estevam
2014-02-14 8:22 ` Marek Vasut
2014-02-15 12:33 ` Jonathan Cameron
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.