Re: [PATCH v4 4/5] iio: adc: versal-sysmon: add threshold event support

From: Andy Shevchenko

Date: Tue Jun 09 2026 - 13:46:15 EST


On Sun, Jun 07, 2026 at 10:02:47PM +0100, Erim, Salih wrote:
> On 07/06/2026 08:31, Andy Shevchenko wrote:
> > On Sat, Jun 06, 2026 at 06:17:06AM +0100, Salih Erim wrote:

...

> > > + ret = regmap_read(sysmon->regmap, upper_off, &upper_reg);
> > > + if (ret)
> > > + return ret;
> > > +
> > > + ret = regmap_read(sysmon->regmap, lower_off, &lower_reg);
> > > + if (ret)
> > > + return ret;
> >
> > Half of the IO accessors have no error checks, these do.
> > Why is this inconsistency?
>
> The regmap calls in sysmon_unmask_worker and sysmon_iio_irq
> have no error checks because they run in contexts where errors
> cannot be propagated (workqueue, hardirq). The init path checks
> errors because it can return them to the caller. Will add a
> comment explaining this.

But the error checks may be used to modify flow inside the respective functions.

--
With Best Regards,
Andy Shevchenko