Re: [PATCH 4/4] iio: magnetometer: rm3100: Use scoped_guard in rm3100_trigger_handler()
From: Andy Shevchenko
Date: Tue Apr 28 2026 - 06:09:14 EST
On Mon, Apr 27, 2026 at 09:43:39PM -0500, Maxwell Doose wrote:
> Replace mutex_lock() and mutex_unlock() calls in
> rm3100_trigger_handler() with the more modern scoped_guard(). This will
> help modernize the driver and bring it up-to-date with modern available
> macros/functions.
...
> + scoped_guard(mutex, &data->lock) {
> + if (ret < 0)
> + goto done;
This is simply wrong.
> }
--
With Best Regards,
Andy Shevchenko