Skip to content

Commit 11373c9

Browse files
windhlmpe
authored andcommitted
powerpc/powermac/pfunc_base: Add missing of_node_put() in macio_gpio_init_one()
Call of_node_put() for the reference 'gparent' escaped out of the previous for_each_child_of_node() as it has increased the refcount. Signed-off-by: Liang He <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b3d6637 commit 11373c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/powerpc/platforms/powermac/pfunc_base.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ static void __init macio_gpio_init_one(struct macio_chip *macio)
136136
for_each_child_of_node(gparent, gp)
137137
pmf_do_functions(gp, NULL, 0, PMF_FLAGS_ON_INIT, NULL);
138138

139+
of_node_put(gparent);
140+
139141
/* Note: We do not at this point implement the "at sleep" or "at wake"
140142
* functions. I yet to find any for GPIOs anyway
141143
*/

0 commit comments

Comments
 (0)