Re: [PATCH v2 4/6] iio: accel: mma8452: Use dev_err_probe()

Andy Shevchenko
2026-04-26T05:46:39Z

On Fri, Apr 24, 2026 at 06:19:19PM +0100, Jonathan Cameron wrote:
> On Wed, 22 Apr 2026 22:37:32 +0300
> Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > On Wed, Apr 22, 2026 at 10:26:41PM +0530, Sanjay Chitroda wrote:

...

> > > 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.
> >
> I briefly wondered what you meant here. Key is you are referring to
> devm_request_threaded_irq() much further down.

Yes, that one.

> Absolutely agree that's wrong. Rule is devm until you stop doing devm and
> then no more devm.
>
> Here it looks like we can take the whole thing devm but it will need
> some custom callbacks and we may run into corner cases with runtime_pm()
> messing with the supplies and devm cleanup doing so (that applies even
> without devm being involved)

> > > }

--
With Best Regards,
Andy Shevchenko