iio:adc:ti-ads8688:: remove redundant ret variable
authorMinghao Chi <chi.minghao@zte.com.cn>
Wed, 15 Dec 2021 06:07:10 +0000 (06:07 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 16 Dec 2021 12:32:04 +0000 (12:32 +0000)
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>
drivers/iio/adc/ti-ads8688.c

index 79c8035..2e24717 100644 (file)
@@ -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,