Re: [PATCH v2 4/5] input: drv260x: Fix unbalanced regulator_disable() call

From: Yauhen Kharuzhy

Date: Thu Feb 19 2026 - 05:12:02 EST


On Wed, Feb 18, 2026 at 06:43:30PM -0800, Dmitry Torokhov wrote:
> Hi Yauhen,
>
> On Sun, Feb 15, 2026 at 04:14:34PM +0200, Yauhen Kharuzhy wrote:
> > +static void drv260x_remove(struct i2c_client *client)
> > +{
> > + struct drv260x_data *haptics = i2c_get_clientdata(client);
> > +
> > + regulator_disable(haptics->regulator);
> > }
>
> This will result in power being shut off the first thing during
> unbinding, which is too early.
>
> I switched this to devm_add_action_or_reset() and applied.

Do you mean that, in this case, regulator_disable() may be called before any
devm_* registered actions? Good point, thanks.

--
Yauhen Kharuzhy