linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] iio: at91: fix error return code in at91_adc_probe()
@ 2013-10-30  5:20 Wei Yongjun
  2013-11-01  8:32 ` Josh Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-10-30  5:20 UTC (permalink / raw)
  To: jic23, grant.likely, rob.herring, maxime.ripard, josh.wu, lars,
	ludovic.desroches
  Cc: yongjun_wei, linux-iio

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return -ENODEV instead of 0 if non-TSMR adc don't
support, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/iio/adc/at91_adc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index 17df749..5b1aa02 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -1047,6 +1047,7 @@ static int at91_adc_probe(struct platform_device *pdev)
 	} else {
 		if (!st->caps->has_tsmr) {
 			dev_err(&pdev->dev, "We don't support non-TSMR adc\n");
+			ret = -ENODEV;
 			goto error_disable_adc_clk;
 		}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] iio: at91: fix error return code in at91_adc_probe()
  2013-10-30  5:20 [PATCH -next] iio: at91: fix error return code in at91_adc_probe() Wei Yongjun
@ 2013-11-01  8:32 ` Josh Wu
  2013-11-02 13:10   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Wu @ 2013-11-01  8:32 UTC (permalink / raw)
  To: Wei Yongjun, jic23, grant.likely, rob.herring, maxime.ripard,
	lars, ludovic.desroches
  Cc: yongjun_wei, linux-iio

Hi, Yongjun

On 10/30/2013 1:20 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return -ENODEV instead of 0 if non-TSMR adc don't
> support, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Thanks and
Acked-by: Josh Wu <josh.wu@atmel.com>

Best Regards,
Josh Wu

> ---
>   drivers/iio/adc/at91_adc.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
> index 17df749..5b1aa02 100644
> --- a/drivers/iio/adc/at91_adc.c
> +++ b/drivers/iio/adc/at91_adc.c
> @@ -1047,6 +1047,7 @@ static int at91_adc_probe(struct platform_device *pdev)
>   	} else {
>   		if (!st->caps->has_tsmr) {
>   			dev_err(&pdev->dev, "We don't support non-TSMR adc\n");
> +			ret = -ENODEV;
>   			goto error_disable_adc_clk;
>   		}
>   
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] iio: at91: fix error return code in at91_adc_probe()
  2013-11-01  8:32 ` Josh Wu
@ 2013-11-02 13:10   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2013-11-02 13:10 UTC (permalink / raw)
  To: Josh Wu, Wei Yongjun, grant.likely, rob.herring, maxime.ripard,
	lars, ludovic.desroches
  Cc: yongjun_wei, linux-iio

On 11/01/13 08:32, Josh Wu wrote:
> Hi, Yongjun
> 
> On 10/30/2013 1:20 PM, Wei Yongjun wrote:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> Fix to return -ENODEV instead of 0 if non-TSMR adc don't
>> support, as done elsewhere in this function.
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Thanks and
> Acked-by: Josh Wu <josh.wu@atmel.com>
> 
Applied to the fixes-togreg branch of iio.git
Given timing, this probably won't go upstream until 3.13-rc1 is
out.

Jonathan
> Best Regards,
> Josh Wu
> 
>> ---
>>   drivers/iio/adc/at91_adc.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
>> index 17df749..5b1aa02 100644
>> --- a/drivers/iio/adc/at91_adc.c
>> +++ b/drivers/iio/adc/at91_adc.c
>> @@ -1047,6 +1047,7 @@ static int at91_adc_probe(struct platform_device *pdev)
>>       } else {
>>           if (!st->caps->has_tsmr) {
>>               dev_err(&pdev->dev, "We don't support non-TSMR adc\n");
>> +            ret = -ENODEV;
>>               goto error_disable_adc_clk;
>>           }
>>  
> 
> -- 
> 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:[~2013-11-02 12:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30  5:20 [PATCH -next] iio: at91: fix error return code in at91_adc_probe() Wei Yongjun
2013-11-01  8:32 ` Josh Wu
2013-11-02 13:10   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).