diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2021-12-15 07:07:10 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-12-16 13:32:04 +0100 |
commit | 8a457852bc12c16968c025cce6a7005b41fafa87 (patch) | |
tree | fb76d5184ab7dda6368be3c8ae95f6b26e369976 /drivers/iio | |
parent | iio: addac: ad74413r: fix off by one in ad74413r_parse_channel_config() (diff) | |
download | linux-8a457852bc12c16968c025cce6a7005b41fafa87.tar.xz linux-8a457852bc12c16968c025cce6a7005b41fafa87.zip |
iio:adc:ti-ads8688:: remove redundant ret variable
Return value from ads8688_prog_write() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/ti-ads8688.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c index 79c803537dc4..2e24717d7f55 100644 --- a/drivers/iio/adc/ti-ads8688.c +++ b/drivers/iio/adc/ti-ads8688.c @@ -281,12 +281,10 @@ static int ads8688_write_reg_range(struct iio_dev *indio_dev, enum ads8688_range range) { unsigned int tmp; - int ret; tmp = ADS8688_PROG_REG_RANGE_CH(chan->channel); - ret = ads8688_prog_write(indio_dev, tmp, range); - return ret; + return ads8688_prog_write(indio_dev, tmp, range); } static int ads8688_write_raw(struct iio_dev *indio_dev, |