[PATCH] pinctrl: bcm: release the NS2 pinmux controller on detach

Linus Walleij linusw at kernel.org
Thu Nov 5 00:49:38 PST 2026


Hi Wentao,

On Tue, Nov 3, 2026 at 11:42 AM Wentao Liang <vulab at iscas.ac.cn> wrote:

> ns2_pinmux_probe() registers the pin controller with pinctrl_register()
> and stores the returned pinctrl_dev in the driver data, but the driver
> has no remove callback and never calls pinctrl_unregister().  The
> controller is therefore never unregistered and its memory is leaked
> when the platform device is unbound.
>
> Use devm_pinctrl_register() instead so that the controller is released
> automatically when the device is detached.
>
> Fixes: b5aa1006e4a9 ("pinctrl: ns2: add pinmux driver support for Broadcom NS2 SoC")
> Cc: stable at vger.kernel.org

??????

What is regressing due to this?

Don't add stable-tags like you add sugar to cereals.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list