Re: [PATCH v3 1/2] iio: light: gp2ap020a00f: simplify locking with guard()
From: Ethan Tidmore
Date: Mon Feb 16 2026 - 16:05:22 EST
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:
>
>> struct gp2ap020a00f_data *data = iio_priv(indio_dev);
>> 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?
Thanks,
ET