Re: [PATCH v9 3/6] iio: adc: ad4691: add triggered buffer support
From: Jonathan Cameron
Date: Tue May 05 2026 - 12:25:18 EST
On Tue, 5 May 2026 17:58:21 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Tue, May 05, 2026 at 02:26:40PM +0100, Jonathan Cameron wrote:
>
> ...
>
> > > > > + for (i = 0; i < ARRAY_SIZE(ad4691_gp_names); i++) {
> > > > > + irq = fwnode_irq_get_byname(dev_fwnode(dev),
> > > > > + ad4691_gp_names[i]);
> > > > > + if (irq > 0)
> > > > > + break;
> > > >
> > > > This is problematic in case the above returns EPROBE_DEFER. Can you confirm
> > > > it
> > > > may not ever happen? (Note, I don't know the answer.)
> > >
> > > You are right, thanks for this!
> > I'm missing something. Why is that a problem? Driver will return
> > the error and a dev_err_probe() is used so it won't print anything.
> > So probe will fail which is exactly what we want.
>
> If there are two IRQs and the first one is probe deferred and second returns
> an error, we return that error instead of the deferral probe.
>
> May be I missed something, but I have no idea how in this case it may return
> the first error code in such a case.
Ah. Indeed. I completely misread the code. if (irq) would do the job to fix this.
J
>