Re: [PATCH] iio: convert to guard(mutex)
From: Andy Shevchenko
Date: Fri Mar 06 2026 - 16:12:55 EST
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