]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/icp-hv: Fix missing of_node_put() in success path
authorNicholas Mc Guire <hofrat@osadl.org>
Wed, 4 Jul 2018 08:03:27 +0000 (10:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:55:16 +0000 (09:55 +0100)
commit97ebcf056f15c285e09307fbf50c9f99bdeafb3c
treec4aef6e7971f0cb5dc54143a705b6dbe71426f48
parent479d8cae79cd295fb126ad7ecda19d9d1f4a849d
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>
arch/powerpc/sysdev/xics/icp-hv.c