[PATCH 2/3] iio: adc: xilinx-ams: use guard(mutex) for automatic locking

Andy Shevchenko andriy.shevchenko at intel.com
Tue Apr 14 02:59:41 PDT 2026


On Tue, Apr 14, 2026 at 06:29:29AM -0300, Guilherme Ivo Bozi wrote:
> Replace open-coded mutex_lock()/mutex_unlock() pairs with
> guard(mutex) to simplify locking and ensure proper unlock on
> all control flow paths.
> 
> This removes explicit unlock handling, reduces boilerplate,
> and avoids potential mistakes in error paths while keeping
> the behavior unchanged.

OK.
Reviewed-by: Andy Shevchenko <andriy.shevchenko at intel.com>

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list