Re: [PATCH] iio: convert to guard(mutex)
From: Rajveer Chaudhari
Date: Fri Mar 06 2026 - 16:24:19 EST
Thanks for the review Andy.
Those files have been dropped in v2 of this series which was just sent.
The v2 focuses only on the ADXL accelerometer drivers where the
conversion also simplifies the error handling.
With Best Regards,
Rajveer Chaudhari
On Sat, Mar 7, 2026 at 2:42 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxx> wrote:
>
> On Sat, Mar 07, 2026 at 01:56:50AM +0530, Rajveer Chaudhari wrote:
> > Replace manual mutex_lock/mutex_unlock pairs with guard(mutex)
> > in several IIO drivers. This ensures the mutex is released on
> > every return path, preventing missed unlocks on error paths.
>
> ...
>
> > #include <linux/kmod.h>
> > #include <linux/list.h>
> > #include <linux/slab.h>
> > +#include <linux/cleanup.h>
>
> Move it to the better place to keep more lines ordered.
>
> > #include <linux/kmod.h>
> > #include <linux/list.h>
> > #include <linux/slab.h>
> > +#include <linux/cleanup.h>
>
> Ditto.,
>
> --
> With Best Regards,
> Andy Shevchenko
>
>