[PATCH v3 2/3] iio: adc: xilinx-ams: use guard(mutex) for automatic locking
Salih Erim
salih.erim at amd.com
Tue May 12 07:25:04 PDT 2026
Hi,
On 4/14/2026 11:40 PM, 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.
>
> Signed-off-by: Guilherme Ivo Bozi <guilherme.bozi at usp.br>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko at intel.com>
> ---
> drivers/iio/adc/xilinx-ams.c | 24 ++++++++----------------
> 1 file changed, 8 insertions(+), 16 deletions(-)
Same indentation issue -- spaces instead of tabs on all new lines.
Salih
More information about the linux-arm-kernel
mailing list