[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251207125647.7306b84f@jic23-huawei>
Date: Sun, 7 Dec 2025 12:56:47 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Haotian Zhang <vulab@...as.ac.cn>, lars@...afoo.de,
michael.hennerich@...log.com, dlechner@...libre.com, nuno.sa@...log.com,
andy@...nel.org, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: ad7606: Fix incorrect type for error return
variable
On Wed, 3 Dec 2025 11:16:26 +0200
Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> On Wed, Dec 3, 2025 at 7:09 AM Haotian Zhang <vulab@...as.ac.cn> 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@...nel.org>
>
I think it is worth getting this backported as it's definitely wrong
if not an actual bug so I'll keep the fixes tag and take it via my fixes
branch.
Thanks,
Jonathan
Powered by blists - more mailing lists