Re: [PATCH v2 4/6] iio: accel: mma8452: Use dev_err_probe()
From: Andy Shevchenko
Date: Wed Apr 22 2026 - 15:37:48 EST
On Wed, Apr 22, 2026 at 10:26:41PM +0530, Sanjay Chitroda wrote:
> dev_err_probe() makes error code handling simpler and handle
> deferred probe nicely (avoid spamming logs).
This patch should go earlier than dev temporary variable one.
And dev needs to be introduced here.
...
> ret = regulator_enable(data->vddio_reg);
> if (ret) {
> - dev_err(dev, "failed to enable VDDIO regulator!\n");
> + dev_err_probe(dev, ret, "failed to enable VDDIO regulator!\n");
> goto disable_regulator_vdd;
Before doing these patches, please fix the mess with the devm/non-devm ordering.
There shouldn't be goto after any devm calls.
> }
--
With Best Regards,
Andy Shevchenko