Re: [PATCH] pinctrl: meson: amlogic-a4: Fix device node reference leak in aml_dt_node_to_map_pinmux()

From: Linus Walleij

Date: Tue Feb 24 2026 - 04:04:53 EST


On Wed, Feb 18, 2026 at 5:51 PM Felix Gu <ustc.gu@xxxxxxxxx> wrote:

> The of_get_parent() function returns a device_node with an incremented
> reference count.
>
> Use the __free(device_node) cleanup attribute to ensure of_node_put()
> is automatically called when pnode goes out of scope, fixing a
> reference leak.
>
> Fixes: 6e9be3abb78c ("pinctrl: Add driver support for Amlogic SoCs")
> Signed-off-by: Felix Gu <ustc.gu@xxxxxxxxx>

Patch applied!

Yours,
Linus Walleij