Re: [PATCH 4/4] iio: frequency: ad9523: use dev_err_probe

From: Jonathan Cameron

Date: Sat Mar 07 2026 - 06:09:56 EST


On Fri, 6 Mar 2026 14:24:25 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Fri, Mar 06, 2026 at 12:24:48PM +0200, Antoniu Miclaus wrote:
> > Use dev_err_probe() instead of dev_err() in the probe path to ensure
> > proper handling of deferred probing and to simplify error handling.
>
> ...
>
> > - if (!pdata) {
> > - dev_err(dev, "no platform data?\n");
> > - return -EINVAL;
> > - }
> > + if (!pdata)
> > + return dev_err_probe(dev, -EINVAL, "no platform data?\n");
>
> Platform data?! Maybe we can get rid of it entirely?

Good thing to do, but big job. There is no DT binding for this and
the platform data is very complex. I checked though and the part is
still recommended for new designs so if Analog wants to support it going
forward that work needs doing.

Jonathan

>