Re: [PATCH 1/7] iio: frequency: adrf6780: use dev_err_probe in probe path
From: Andy Shevchenko
Date: Fri Feb 20 2026 - 08:58:51 EST
On Fri, Feb 20, 2026 at 03:56:58PM +0200, Andy Shevchenko wrote:
> On Fri, Feb 20, 2026 at 03:11:39PM +0200, Antoniu Miclaus wrote:
...
> > ret = __adrf6780_spi_update_bits(st, ADRF6780_REG_CONTROL,
> > ADRF6780_SOFT_RESET_MSK,
> > FIELD_PREP(ADRF6780_SOFT_RESET_MSK, 1));
> > - if (ret) {
> > - dev_err(&spi->dev, "ADRF6780 SPI software reset failed.\n");
> > - return ret;
> > - }
> > + if (ret)
> > + return dev_err_probe(&spi->dev, ret,
> > + "ADRF6780 SPI software reset failed.\n");
>
> Consider adding
>
> struct device *dev = &spi->dev;
>
> at the top, so this line becomes
>
> return dev_err_probe(dev, ret, "ADRF6780 SPI software reset failed.\n");
>
> (while at it, I would dare to drop 'SPI' from the message as is easy to derive that
> the device in question is connected to SPI bus.)
>
> return dev_err_probe(dev, ret, "ADRF6780 software reset failed.\n");
...
> Ditto for the rest.
And also for the entire series (except patch 5 where it seems already
the case).
--
With Best Regards,
Andy Shevchenko