All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] iio: adc: twl6030-gpadc: fix error return code in twl6030_gpadc_read_raw()
@ 2013-08-23  2:47 Wei Yongjun
  2013-08-28 19:43   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-08-23  2:47 UTC (permalink / raw)
  To: jic23, grant.likely, rob.herring, oleksandr.kozaruk, gg, balajitk
  Cc: yongjun_wei, linux-iio, devicetree

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

Fix to return -EINTR in the error handling case instead
of 0 (ret is assigned after goto, which has no effect),
as done elsewhere in this function.

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

diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
index a558516..0ea96c0 100644
--- a/drivers/iio/adc/twl6030-gpadc.c
+++ b/drivers/iio/adc/twl6030-gpadc.c
@@ -537,8 +537,8 @@ static int twl6030_gpadc_read_raw(struct iio_dev *indio_dev,
 		ret = -ETIMEDOUT;
 		goto err;
 	} else if (timeout < 0) {
-		goto err;
 		ret = -EINTR;
+		goto err;
 	}
 
 	switch (mask) {


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

* Re: [PATCH -next] iio: adc: twl6030-gpadc: fix error return code in twl6030_gpadc_read_raw()
@ 2013-08-28 19:43   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2013-08-28 19:43 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: jic23, grant.likely, rob.herring, oleksandr.kozaruk, gg, balajitk,
	yongjun_wei, linux-iio, devicetree

On 08/23/13 03:47, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return -EINTR in the error handling case instead
> of 0 (ret is assigned after goto, which has no effect),
> as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Thanks. Applied to the togreg branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git

Given timing I might end up ripping this out to separate it from new
stuff.

Jonathan
> ---
>  drivers/iio/adc/twl6030-gpadc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
> index a558516..0ea96c0 100644
> --- a/drivers/iio/adc/twl6030-gpadc.c
> +++ b/drivers/iio/adc/twl6030-gpadc.c
> @@ -537,8 +537,8 @@ static int twl6030_gpadc_read_raw(struct iio_dev *indio_dev,
>  		ret = -ETIMEDOUT;
>  		goto err;
>  	} else if (timeout < 0) {
> -		goto err;
>  		ret = -EINTR;
> +		goto err;
>  	}
>  
>  	switch (mask) {
> 
> --
> 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

* Re: [PATCH -next] iio: adc: twl6030-gpadc: fix error return code in twl6030_gpadc_read_raw()
@ 2013-08-28 19:43   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2013-08-28 19:43 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: jic23-KWPb1pKIrIJaa/9Udqfwiw, grant.likely-QSEj5FYQhm4dnm+yROfE0A,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, oleksandr.kozaruk-l0cyMroinI0,
	gg-kDsPt+C1G03kYMGBc/C6ZA, balajitk-l0cyMroinI0,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 08/23/13 03:47, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
> 
> Fix to return -EINTR in the error handling case instead
> of 0 (ret is assigned after goto, which has no effect),
> as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
Thanks. Applied to the togreg branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git

Given timing I might end up ripping this out to separate it from new
stuff.

Jonathan
> ---
>  drivers/iio/adc/twl6030-gpadc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
> index a558516..0ea96c0 100644
> --- a/drivers/iio/adc/twl6030-gpadc.c
> +++ b/drivers/iio/adc/twl6030-gpadc.c
> @@ -537,8 +537,8 @@ static int twl6030_gpadc_read_raw(struct iio_dev *indio_dev,
>  		ret = -ETIMEDOUT;
>  		goto err;
>  	} else if (timeout < 0) {
> -		goto err;
>  		ret = -EINTR;
> +		goto err;
>  	}
>  
>  	switch (mask) {
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-08-28 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23  2:47 [PATCH -next] iio: adc: twl6030-gpadc: fix error return code in twl6030_gpadc_read_raw() Wei Yongjun
2013-08-28 19:43 ` Jonathan Cameron
2013-08-28 19:43   ` 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.