DORMANTno replies

[PATCH -next] iio: adc: twl6030-gpadc: fix error return code in twl6030_gpadc_read_raw()

From: Wei Yongjun <hidden>
Date: 2013-08-23 02:47:15
Also in: linux-iio
Subsystem: iio subsystem and drivers, the rest · Maintainers: Jonathan Cameron, Linus Torvalds

From: Wei Yongjun <redacted>

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 <redacted>
---
 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) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help