Re: [PATCH] staging: iio: frequency: ad9834: use devm_mutex_init()
From: Jonathan Cameron
Date: Sat Nov 14 2026 - 20:04:51 EST
On Sat, 14 Nov 2026 12:57:19 +0530
Arnav Kapoor <kapoorarnav43@xxxxxxxxx> wrote:
> On Fri, Nov 13, 2026 at 10:20:21PM -0800, Niloy Meharchandani wrote:
> > Initialize st->lock via devm_mutex_init() instead of mutex_init() in
> > ad9834_probe() and propagate any initialization error. Since ad9834
> > already manages its remaining resources with devm_* helpers and defines
> > no remove() callback, using devm_mutex_init() ensures proper mutex
> > cleanup on probe failure or device removal when CONFIG_DEBUG_MUTEXES is
> > enabled.
>
> Reviewed-by: Arnav Kapoor <kapoorarnav43@xxxxxxxxx>
>
Applied to the testing branch of iio.git.
Thanks,
Jonathan