aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac/pfunc_base.c
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-07-16 15:31:11 +0800
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-05 17:30:29 +1000
commit11373c933db20f8b6fd2cad27712e683ac9785f0 (patch)
tree3fb32f077006db47cba24fc5b126b8d6fd9312e1 /arch/powerpc/platforms/powermac/pfunc_base.c
parentpowerpc/powermac/low_i2c: Add missing of_node_put() in kw_i2c_probe() (diff)
downloadlinux-dev-11373c933db20f8b6fd2cad27712e683ac9785f0.tar.xz
linux-dev-11373c933db20f8b6fd2cad27712e683ac9785f0.zip
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 <windhl@126.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220716073111.539739-1-windhl@126.com
Diffstat (limited to '')
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index 9c2947a3edd5..085e0ad20eba 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -136,6 +136,8 @@ static void __init macio_gpio_init_one(struct macio_chip *macio)
for_each_child_of_node(gparent, gp)
pmf_do_functions(gp, NULL, 0, PMF_FLAGS_ON_INIT, NULL);
+ of_node_put(gparent);
+
/* Note: We do not at this point implement the "at sleep" or "at wake"
* functions. I yet to find any for GPIOs anyway
*/