Re: (subset) [PATCH] mfd: twl-core: unregister the auxiliary platform device on unbind
From: Lee Jones
Date: Tue Sep 22 2026 - 08:18:57 EST
On Sun, 13 Sep 2026 16:50:12 -0400, Myeonghun Pak wrote:
> twl_probe() registers a standalone platform device named "twl", but keeps
> its pointer only in a local variable. Probe errors unregister the device,
> while successful probe leaves no way for twl_remove() to release it. The
> platform device therefore remains registered after the I2C driver unbinds.
>
> Register a managed action on the I2C device immediately after adding the
> platform device. This unregisters it on probe failure and driver unbind,
> and also handles failure to register the action itself. Remove the manual
> error-path unregister to avoid releasing the device twice.
>
> [...]
Applied, thanks!
[1/1] mfd: twl-core: unregister the auxiliary platform device on unbind
commit: 62d519c24f8373772d4fb390ba5926ebc8c17509
--
Lee Jones [李琼斯]