]> git.itanic.dy.fi Git - linux-stable/commit
KVM: PPC: Book3S HV: Add of_node_put() in success path
authorNicholas Mc Guire <hofrat@osadl.org>
Sat, 7 Jul 2018 06:53:07 +0000 (08:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:38:09 +0000 (08:38 +0200)
commitbdf948eaa5593f82bb3345e0432a5671091f487d
tree9e7e3392f60d1d0679a032ddda90d175eca8f2b6
parentc818695c71068a30580064fc65fea51e074f57bf
KVM: PPC: Book3S HV: Add of_node_put() in success path

[ Upstream commit 51eaa08f029c7343df846325d7cf047be8b96e81 ]

The call to of_find_compatible_node() is returning a pointer with
incremented refcount so it must be explicitly decremented after the
last use. As here it is only being used for checking of node presence
but the result is not actually used in the success path it can be
dropped immediately.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: commit f725758b899f ("KVM: PPC: Book3S HV: Use OPAL XICS emulation on POWER9")
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kvm/book3s_hv.c