Re: [PATCH v2 2/4] iio: magnetometer: rm3100: Use scoped_guard() in rm3100_get_samp_freq()

Maxwell Doose
2026-04-28T14:00:00Z

On Tue, Apr 28, 2026 at 8:26 AM Andy Shevchenko
<andriy.shevchenko@intel.com> wrote:

> > - mutex_lock(&data->lock);
> > - ret = regmap_read(data->regmap, RM3100_REG_TMRC, &tmp);
> > - mutex_unlock(&data->lock);
> > - if (ret < 0)
> > - return ret;
> > + scoped_guard(mutex, &data->lock) {
> > + ret = regmap_read(data->regmap, RM3100_REG_TMRC, &tmp);
>
> > +
>
> Redundant blank line as ret is defined elsewhere.

Shoot. I'm away right now but once I get back I can fix that.

best regards,
maxwell