* [PATCH] arch: powerpc: platforms: 85xx: Fix refcount leak bug in ksi8560.c
@ 2022-06-16 13:29 Liang He
2022-09-09 12:07 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Liang He @ 2022-06-16 13:29 UTC (permalink / raw)
To: oss, mpe, benh, paulus, christophe.leroy
Cc: windhl, linuxppc-dev, linux-kernel
In ksi8560_setup_arch(), of_find_compatible_node() will return a
node pointer with refcount incremented. We should use of_node_put()
when it is not used anymore.
Signed-off-by: Liang He <windhl@126.com>
---
arch/powerpc/platforms/85xx/ksi8560.c | 2 ++
1 file changed, 2 insertions(+)
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);
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] arch: powerpc: platforms: 85xx: Fix refcount leak bug in ksi8560.c
2022-06-16 13:29 [PATCH] arch: powerpc: platforms: 85xx: Fix refcount leak bug in ksi8560.c Liang He
@ 2022-09-09 12:07 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2022-09-09 12:07 UTC (permalink / raw)
To: paulus, christophe.leroy, oss, Liang He, benh, mpe
Cc: linuxppc-dev, linux-kernel
On Thu, 16 Jun 2022 21:29:22 +0800, Liang He wrote:
> In ksi8560_setup_arch(), of_find_compatible_node() will return a
> node pointer with refcount incremented. We should use of_node_put()
> when it is not used anymore.
>
>
Applied to powerpc/next.
[1/1] arch: powerpc: platforms: 85xx: Fix refcount leak bug in ksi8560.c
https://git.kernel.org/powerpc/c/64e696af167f612cd1ecba89edfeb2353ca59947
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-09 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 13:29 [PATCH] arch: powerpc: platforms: 85xx: Fix refcount leak bug in ksi8560.c Liang He
2022-09-09 12:07 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®