linux-iio.vger.kernel.org archive mirror
 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; 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

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).