Commit 8a457852 authored by Minghao Chi's avatar Minghao Chi Committed by Jonathan Cameron

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 5d97d9e9
...@@ -281,12 +281,10 @@ static int ads8688_write_reg_range(struct iio_dev *indio_dev, ...@@ -281,12 +281,10 @@ static int ads8688_write_reg_range(struct iio_dev *indio_dev,
enum ads8688_range range) enum ads8688_range range)
{ {
unsigned int tmp; unsigned int tmp;
int ret;
tmp = ADS8688_PROG_REG_RANGE_CH(chan->channel); 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, static int ads8688_write_raw(struct iio_dev *indio_dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment