Skip to content

Commit c5512e0

Browse files
ISCAS-Vulabjic23
authored andcommitted
iio: adc: ad7606: Fix incorrect type for error return variable
The variable ret is declared as unsigned int but is used to store return values from functions returning int, which may be negative error codes. Change ret from unsigned int to int. Fixes: 849cebf ("iio: adc: ad7606: Add iio-backend support") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 6b39824 commit c5512e0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/iio/adc/ad7606_par.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ static int ad7606_par_bus_setup_iio_backend(struct device *dev,
4343
struct iio_dev *indio_dev)
4444
{
4545
struct ad7606_state *st = iio_priv(indio_dev);
46-
unsigned int ret, c;
46+
unsigned int c;
47+
int ret;
4748
struct iio_backend_data_fmt data = {
4849
.sign_extend = true,
4950
.enable = true,

0 commit comments

Comments
 (0)