Re: [PATCH] iio: adc: ad7606: Fix incorrect type for error return variable

From: Andy Shevchenko

Date: Wed Dec 03 2025 - 04:17:17 EST


On Wed, Dec 3, 2025 at 7:09 AM Haotian Zhang <vulab@xxxxxxxxxxx> wrote:
>
> 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: 849cebf8dc67 ("iio: adc: ad7606: Add iio-backend support")

Since it returns an int, it is just double conversion (however in the
standard promotion from unsigned to signed is UB if I remember
correctly). That said, I am not sure this justifies the Fixes tag, but
I'm not against it.

Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko