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

Andy Shevchenko
2026-02-04T01:16:00Z

On Tue, Feb 03, 2026 at 08:05:29PM -0500, 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

Missed period.

> This was compiled test only

Ditto.

No need to put this into commit message.

Code wise looks good.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

--
With Best Regards,
Andy Shevchenko