Re: [PATCH v2] iio: magnetometer: bmc150_magn: Used guard() for mutex protection

David Lechner
2026-02-04T01:09:49Z

On 2/3/26 7:05 PM, Neel Bullywon wrote:
> Replaced the manual mutex lock/unlock calls using guard() to simplify
> the error handling and reduce goto statement usage.
>
> By using RAII-style cleanup, it ensures the mutex is always released
> when exiting the function, regardless of the return path taken
>
> This was compiled test only
>
> Signed-off-by: Neel Bullywon <neelb2403@gmail.com>
> ---
Reviewed-by: David Lechner <dlechner@baylibre.com>