diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2018-07-04 10:03:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 10:11:37 +0100 |
commit | d0e231010e6c470a876e48decc9a083d57571d32 (patch) | |
tree | 141281f4a7a66ddcc1037e4d180d6b7dbe443491 /arch | |
parent | e16a3a250266417c70c4b2e21aae7fd81700ebf9 (diff) | |
download | linux-stable-d0e231010e6c470a876e48decc9a083d57571d32.tar.gz linux-stable-d0e231010e6c470a876e48decc9a083d57571d32.tar.bz2 linux-stable-d0e231010e6c470a876e48decc9a083d57571d32.zip |
powerpc/icp-hv: Fix missing of_node_put() in success path
[ Upstream commit d3e669f31ec35856f5e85df9224ede5bdbf1bc7b ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/sysdev/xics/icp-hv.c | 1 |
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; } |