Re: [PATCH] pinctrl: pinconf-generic: fix of_node reference count leak in dt_node_to_map_pinmux

From: Linus Walleij

Date: Tue May 26 2026 - 05:46:09 EST


On Sat, May 23, 2026 at 10:08 AM Wentao Liang <vulab@xxxxxxxxxxx> wrote:

> of_get_parent() acquires a reference on pnode, but the reference is never
> released on any return path. Add of_node_put(pnode) in the exit label and
> before the early return path.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 7112c05fff83 ("pinctrl: pinconf-generic: Add API for pinmux propertity in DTS file")
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>

The code you're patching has been refactored, rebase you changes on the
pinctrl "devel" branch please.

Yours,
Linus Walleij