drivers/iio: remove redundant ret variable
PATCH 1/1 drivers/iio: remove redundant ret variable
From: Minghao Chi <[email protected]>
Return value from ads8688_prog_write() directly instead of taking this in another redundant variable.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
--- drivers/iio/adc/ti-ads8688.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iio/adc/ti-ads8688.c +1 -3
@@ -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,
Signature · 1 line
2.25.1
Jonathan Cameron
AppliedQuoted 7 lines · On Wed, 15 Dec 2021 06:07:10 +0000 [email protected] wrote:
From: Minghao Chi <[email protected]>
Return value from
ads8688_prog_write()directly instead of taking this in another redundant variable.Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>
applied,
Thanks,
Quoted 22 lines
--- drivers/iio/adc/ti-ads8688.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/iio/adc/ti-ads8688.c +1
-3@@ -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,