From: Wei Yongjun Date: Fri, 23 Aug 2013 02:47:00 +0000 (+0100) Subject: iio: adc: twl6030-gpadc: fix error return code in twl6030_gpadc_read_raw() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2d2da9fc7113ee5df06519e435f2f9430acf40c5;p=openwrt%2Fstaging%2Fblogic.git iio: adc: twl6030-gpadc: fix error return code in twl6030_gpadc_read_raw() 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 Reported-by: Dan Carpenter Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c index a558516d140d..0ea96c058c08 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) {