* [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; 2+ 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] 2+ messages in thread
* Re: [PATCH -next] iio: adc: twl6030-gpadc: fix error return code in twl6030_gpadc_read_raw()
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
0 siblings, 0 replies; 2+ 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] 2+ messages in thread
end of thread, other threads:[~2013-08-28 18:43 UTC | newest]
Thread overview: 2+ 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
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).