Re: [PATCH v2 4/5] iio: adc: ti-adc161s626: log buffer setup failure in probe
From: Andy Shevchenko
Date: Wed Jun 24 2026 - 07:27:06 EST
On Wed, Jun 24, 2026 at 03:43:44PM +0530, Prashant Rahul wrote:
> On Wed Jun 24, 2026 at 1:06 AM IST, Jonathan Cameron wrote:
> > Why this particular one but not the devm_iio_device_register() below it?
> > Both pretty much only fail on driver bugs. Or out of memory for
> > which dev_err_probe() doesn't print anything anyway (on basis that
> > is normally pretty noisy).
>
> My apologies, I wasnt aware that dev_err_probe simply ignores `-ENOMEM`.
> Looking at drivers/base/core.c:5096, it is pretty evident that it does.
>
> My goal with the patch series was to change dev_err into dev_err_probe,
> as my understanding of dev_err_probe was that it's a specialization of
> dev_err for probe contexts.
Jonathan, actually the triggered buffer setup might return not -ENOMEM error
code for the surprise. After all this series does add not a dead code, but
a quite rare to be used one.
https://elixir.bootlin.com/linux/v7.1.1/source/drivers/iio/buffer/industrialio-triggered-buffer.c#L57
--
With Best Regards,
Andy Shevchenko