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

From: Maxwell Doose

Date: Tue Apr 28 2026 - 10:39:42 EST


On Tue, Apr 28, 2026 at 8:26 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxx> 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