]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: meson: amlogic-a4: Fix device node reference leak in aml_dt_node_to_map_pinmux()
authorFelix Gu <ustc.gu@gmail.com>
Wed, 18 Feb 2026 16:51:22 +0000 (00:51 +0800)
committerLinus Walleij <linusw@kernel.org>
Tue, 24 Feb 2026 09:51:30 +0000 (10:51 +0100)
commita2539b92e4b791c1ba482930b5e51b1591975461
tree989495a4df00ca2fcca2feaea46cd14575113694
parente9e268ea9df102abef34d7afba59ef4d5868d5d7
pinctrl: meson: amlogic-a4: Fix device node reference leak in aml_dt_node_to_map_pinmux()

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@gmail.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/meson/pinctrl-amlogic-a4.c