summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2018-07-04 11:03:27 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2020-08-24 18:31:31 +0300
commitd3e669f31ec35856f5e85df9224ede5bdbf1bc7b (patch)
tree0dd85230795b5d7f815d616584623a25d6964740 /arch/powerpc/sysdev
parent67c3e59443f5fc77be39e2ce0db75fbfa78c7965 (diff)
downloadlinux-d3e669f31ec35856f5e85df9224ede5bdbf1bc7b.tar.xz
powerpc/icp-hv: Fix missing of_node_put() in success path
Both of_find_compatible_node() and of_find_node_by_type() will return a refcounted node on success - thus for the success path the node must be explicitly released with a of_node_put(). Fixes: 0b05ac6e2480 ("powerpc/xics: Rewrite XICS driver") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1530691407-3991-1-git-send-email-hofrat@osadl.org
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/xics/icp-hv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/xics/icp-hv.c b/arch/powerpc/sysdev/xics/icp-hv.c
index ad8117148ea3..21b9d1bf39ff 100644
--- a/arch/powerpc/sysdev/xics/icp-hv.c
+++ b/arch/powerpc/sysdev/xics/icp-hv.c
@@ -174,6 +174,7 @@ int icp_hv_init(void)
icp_ops = &icp_hv_ops;
+ of_node_put(np);
return 0;
}