Re: [PATCH v2 00/12] iio: use dev_err_probe in probe path for ADI drivers

From: Andy Shevchenko

Date: Mon Feb 23 2026 - 09:09:27 EST


On Mon, Feb 23, 2026 at 03:13:51PM +0200, Antoniu Miclaus wrote:
> Use dev_err_probe() consistently in the probe path of several ADI IIO
> drivers. This simplifies error handling and ensures proper logging of
> deferred probes.
>
> Each driver is updated in two patches: first introducing a local
> struct device variable to simplify repeated &spi->dev / &client->dev
> references, then converting error paths to use dev_err_probe().
>
> Drivers updated:
> - adrf6780
> - admv1014
> - admv1013
> - adf4377
> - ad7293
> - admv8818

As I mentioned, use a rule of thumb:

- when devm_ is used in the function, error messages may be converted to
dev_err_probe() as devm_ is supposed to be used only at ->probe() stage

- try to avoid ping-pong type of changes when the same line is modified
2+ times in a row in the same series (there are exceptions, but not here)

--
With Best Regards,
Andy Shevchenko