Linux IIO development
 help / color / mirror / Atom feed
* [PATCH -next] iio: dac: ad7303: fix error return code in ad7303_probe()
@ 2013-06-18 13:08 Wei Yongjun
  2013-06-22 10:38 ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Yongjun @ 2013-06-18 13:08 UTC (permalink / raw)
  To: jic23, lars; +Cc: yongjun_wei, linux-iio

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

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/iio/dac/ad7303.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ad7303.c b/drivers/iio/dac/ad7303.c
index 85aeef6..d546f50 100644
--- a/drivers/iio/dac/ad7303.c
+++ b/drivers/iio/dac/ad7303.c
@@ -235,8 +235,10 @@ static int ad7303_probe(struct spi_device *spi)
 
 	if (ext_ref) {
 		st->vref_reg = regulator_get(&spi->dev, "REF");
-		if (IS_ERR(st->vref_reg))
+		if (IS_ERR(st->vref_reg)) {
+			ret = PTR_ERR(st->vref_reg);
 			goto err_disable_vdd_reg;
+		}
 
 		ret = regulator_enable(st->vref_reg);
 		if (ret)


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

* Re: [PATCH -next] iio: dac: ad7303: fix error return code in ad7303_probe()
  2013-06-18 13:08 [PATCH -next] iio: dac: ad7303: fix error return code in ad7303_probe() Wei Yongjun
@ 2013-06-22 10:38 ` Jonathan Cameron
  2013-06-22 13:30   ` Lars-Peter Clausen
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2013-06-22 10:38 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: lars, yongjun_wei, linux-iio

On 06/18/2013 02:08 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
This one looks pretty obvious so I'll take it without waiting
for any other comments.

Applied to togreg branch of iio.git

Thanks,


> ---
>  drivers/iio/dac/ad7303.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad7303.c b/drivers/iio/dac/ad7303.c
> index 85aeef6..d546f50 100644
> --- a/drivers/iio/dac/ad7303.c
> +++ b/drivers/iio/dac/ad7303.c
> @@ -235,8 +235,10 @@ static int ad7303_probe(struct spi_device *spi)
>  
>  	if (ext_ref) {
>  		st->vref_reg = regulator_get(&spi->dev, "REF");
> -		if (IS_ERR(st->vref_reg))
> +		if (IS_ERR(st->vref_reg)) {
> +			ret = PTR_ERR(st->vref_reg);
>  			goto err_disable_vdd_reg;
> +		}
>  
>  		ret = regulator_enable(st->vref_reg);
>  		if (ret)
> 
> --
> 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] 5+ messages in thread

* Re: [PATCH -next] iio: dac: ad7303: fix error return code in ad7303_probe()
  2013-06-22 10:38 ` Jonathan Cameron
@ 2013-06-22 13:30   ` Lars-Peter Clausen
  2013-06-22 14:00     ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Lars-Peter Clausen @ 2013-06-22 13:30 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Wei Yongjun, yongjun_wei, linux-iio

On 06/22/2013 12:38 PM, Jonathan Cameron wrote:
> On 06/18/2013 02:08 PM, Wei Yongjun wrote:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function.
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> This one looks pretty obvious so I'll take it without waiting
> for any other comments.
> 
> Applied to togreg branch of iio.git
> 
> Thanks,


hm, I actually though I'd acked this patch, but looks like the mail didn't make
it through.

- Lars

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

* Re: [PATCH -next] iio: dac: ad7303: fix error return code in ad7303_probe()
  2013-06-22 13:30   ` Lars-Peter Clausen
@ 2013-06-22 14:00     ` Jonathan Cameron
  2013-06-29  9:47       ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2013-06-22 14:00 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Wei Yongjun, yongjun_wei, linux-iio

On 06/22/2013 02:30 PM, Lars-Peter Clausen wrote:
> On 06/22/2013 12:38 PM, Jonathan Cameron wrote:
>> On 06/18/2013 02:08 PM, Wei Yongjun wrote:
>>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>>
>>> Fix to return a negative error code from the error handling
>>> case instead of 0, as done elsewhere in this function.
>>>
>>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>> This one looks pretty obvious so I'll take it without waiting
>> for any other comments.
>>
>> Applied to togreg branch of iio.git
>>
>> Thanks,
> 
> 
> hm, I actually though I'd acked this patch, but looks like the mail didn't make
> it through.
> 
> - Lars
> 
Added an ack as I hadn't pushed out to a public tree yet anyway.

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

* Re: [PATCH -next] iio: dac: ad7303: fix error return code in ad7303_probe()
  2013-06-22 14:00     ` Jonathan Cameron
@ 2013-06-29  9:47       ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2013-06-29  9:47 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Wei Yongjun, yongjun_wei, linux-iio

On 06/22/2013 03:00 PM, Jonathan Cameron wrote:
> On 06/22/2013 02:30 PM, Lars-Peter Clausen wrote:
>> On 06/22/2013 12:38 PM, Jonathan Cameron wrote:
>>> On 06/18/2013 02:08 PM, Wei Yongjun wrote:
>>>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>>>
>>>> Fix to return a negative error code from the error handling
>>>> case instead of 0, as done elsewhere in this function.
>>>>
>>>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>> This one looks pretty obvious so I'll take it without waiting
>>> for any other comments.
>>>
>>> Applied to togreg branch of iio.git
>>>
>>> Thanks,
>>
>>
>> hm, I actually though I'd acked this patch, but looks like the mail didn't make
>> it through.
>>
>> - Lars
>>
> Added an ack as I hadn't pushed out to a public tree yet anyway.
Just for reference, the timing is such that I've moved this to the fixes-togreg
branch as from the IIO point of view we have now entered the next cycle.

Jonathan

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

end of thread, other threads:[~2013-06-29  9:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 13:08 [PATCH -next] iio: dac: ad7303: fix error return code in ad7303_probe() Wei Yongjun
2013-06-22 10:38 ` Jonathan Cameron
2013-06-22 13:30   ` Lars-Peter Clausen
2013-06-22 14:00     ` Jonathan Cameron
2013-06-29  9:47       ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox