Re: [PATCH v3 1/2] iio: light: gp2ap020a00f: simplify locking with guard()
From: Andy Shevchenko
Date: Tue Feb 17 2026 - 03:37:34 EST
On Mon, Feb 16, 2026 at 03:04:55PM -0600, Ethan Tidmore wrote:
> On Mon Feb 16, 2026 at 1:08 AM CST, Andy Shevchenko wrote:
> > On Sun, Feb 15, 2026 at 06:53:16PM -0600, Ethan Tidmore wrote:
...
> >> int i, err = 0;
> >
> > Would you need the err assignment now?
>
> I'm not familiar with iio_for_each_active_channel() but, if there's a
> chance it could run zero times, then it'd run into if (err) with err
> not being initialized?
Have you read my other comments? I also mentioned to replace
err = -ENOMEM;
with
return -ENOMEM;
--
With Best Regards,
Andy Shevchenko