Re: [PATCH] iio: proximity: isl29501: Fix return type of isl29501_register_write
From: Jonathan Cameron
Date: Sun Sep 20 2026 - 19:58:21 EST
On Thu, 17 Sep 2026 15:23:39 +0200
Joshua Crofts <joshua.crofts1@xxxxxxxxx> wrote:
> On Thu, 17 Sep 2026 14:00:52 +0100
> Salah Triki <salah.triki@xxxxxxxxx> wrote:
>
> > isl29501_register_write() was returning a u32 instead of an int.
> > Since the function returns negative error codes (such as -ERANGE or
> > return values from i2c_smbus_write_byte_data()), returning an unsigned
> > integer type prevents callers from correctly checking for negative error
> > conditions.
> >
> > Fix this by changing the function return type from u32 to int.
> >
> > This was found through manual code review.
> >
> > Fixes: 1c28799257bc ("iio: light: isl29501: Add support for the ISL29501 ToF sensor.")
> > Signed-off-by: Salah Triki <salah.triki@xxxxxxxxx>
> > ---
>
> Makes sense. I'd mark this for stable.
>
> Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
Applied and marked for stable. Note this doesn't mean it will
go upstream particularly quickly. Most likely I'll be folding
the fixes into the pull request for the next merge window.
Thanks,
Jonathan
>