Re: [PATCH] iio: light: gp2ap020a00f: Correct return type to int

From: Ethan Tidmore

Date: Sat Feb 14 2026 - 14:25:31 EST


On Sat Feb 14, 2026 at 1:08 PM CST, Jonathan Cameron wrote:
> On Tue, 10 Feb 2026 18:48:19 -0600
> Ethan Tidmore <ethantidmore06@xxxxxxxxx> wrote:

...

> Did you find a path via which it can actually return an error? char
> and dir are tightly constrained inputs.
>
> I think the error return is probably just defensive coding against future bugs
> and compiler warning supression.

Yes you're right. I was just correcting a signness warning from smatch
and just added the extra checks.

>
> If so it's still a good thing to clean up but Fixes tag and backports
> probably not appropriate.
>
> And best of all, once it's not a fix we can use some guard()
> magic to make these functions and your new checks cleaner.
> guard() usage would be a precursor patch with this one on top to minimize
> churn.

I'll send a series adding these checks and using guard() and will drop
the Fixes: tag.

Thanks,

ET