Re: [PATCH v3 1/7] iio: accel: kx022a: Use cleanup.h helpers

Jonathan Cameron
2024-11-30T18:05:49Z

On Thu, 28 Nov 2024 11:01:48 +0200
Matti Vaittinen <mazziesaccount@gmail.com> wrote:

> A few functions in KX022A need to use mutex for protecting the
> enabling/disabling of the measurement while configurations are being
> made. Some of the functions can be slightly simplified by using the
> __cleanup based scoped mutexes, which allows dropping the goto based
> unlocking at error path.
>
> Simplify error paths using guard(mutex).
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Applied this patch to the testing branch of iio.git.
I'll rebase on rc1 in a couple of days before pushing out as togreg.

Thanks,

Jonathan