aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-06-16 21:29:22 +0800
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-05 17:28:25 +1000
commit64e696af167f612cd1ecba89edfeb2353ca59947 (patch)
tree70d87485613712d4504272244142f5bfbf68f3ac
parentpowerpc/512x: Add missing of_node_put() in mpc5121_clk_init() (diff)
downloadlinux-dev-64e696af167f612cd1ecba89edfeb2353ca59947.tar.xz
linux-dev-64e696af167f612cd1ecba89edfeb2353ca59947.zip
powerpc/85xx: Add missing of_node_put() in ksi8560.c
In ksi8560_setup_arch(), of_find_compatible_node() will return a node pointer with refcount incremented. The reference should be dropped with of_node_put() when it is not used anymore. Signed-off-by: Liang He <windhl@126.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220616132922.3987053-1-windhl@126.com
-rw-r--r--arch/powerpc/platforms/85xx/ksi8560.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c
index bdf9d42f8521..a22f02b0fc77 100644
--- a/arch/powerpc/platforms/85xx/ksi8560.c
+++ b/arch/powerpc/platforms/85xx/ksi8560.c
@@ -133,6 +133,8 @@ static void __init ksi8560_setup_arch(void)
else
printk(KERN_ERR "Can't find CPLD in device tree\n");
+ of_node_put(cpld);
+
if (ppc_md.progress)
ppc_md.progress("ksi8560_setup_arch()", 0);