Re: [PATCH v5 01/10] iio: light: gp2ap020a00f: simplify locking with guard()
From: Andy Shevchenko
Date: Mon Feb 23 2026 - 06:58:06 EST
On Sun, Feb 22, 2026 at 09:40:11PM -0600, Ethan Tidmore wrote:
> Use the guard() cleanup handler to manage the device lock.
> This simplifies the code by removing the need for manual unlocking
> and goto error handling paths.
>
> Suggested-by: Jonathan Cameron <jic23@xxxxxxxxxx>
> Signed-off-by: Ethan Tidmore <ethantidmore06@xxxxxxxxx>
> ---
> v5:
> - Integrate with Andy Shevchenko's cleanups.
Bingo!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko