Skip to content

Commit 80192ef

Browse files
Yuuoniysre
authored andcommitted
power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe
of_find_matching_node_and_match() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 0e545f5 ("power: reset: driver for the Versatile syscon reboot") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent 0f5de2f commit 80192ef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/power/reset/arm-versatile-reboot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ static int __init versatile_reboot_probe(void)
146146
versatile_reboot_type = (enum versatile_reboot)reboot_id->data;
147147

148148
syscon_regmap = syscon_node_to_regmap(np);
149+
of_node_put(np);
149150
if (IS_ERR(syscon_regmap))
150151
return PTR_ERR(syscon_regmap);
151152

0 commit comments

Comments
 (0)