Skip to content

Commit

Permalink
iio:adc:ti-ads8688:: remove redundant ret variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Minghao Chi authored and Jonathan Cameron committed Dec 16, 2021
1 parent 5d97d9e commit 8a45785
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/iio/adc/ti-ads8688.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8a45785

Please sign in to comment.