diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-08-23 04:47:00 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-08-28 21:45:43 +0200 |
commit | 2d2da9fc7113ee5df06519e435f2f9430acf40c5 (patch) | |
tree | 6fcff5fab5f574e7c1df1812dc9eb7b44fdedcdc /drivers/iio | |
parent | staging: iio: ad7746: Use devm_iio_device_alloc (diff) | |
download | linux-2d2da9fc7113ee5df06519e435f2f9430acf40c5.tar.xz linux-2d2da9fc7113ee5df06519e435f2f9430acf40c5.zip |
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 <yongjun_wei@trendmicro.com.cn>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/twl6030-gpadc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |