diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2018-07-07 09:53:07 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2018-07-18 08:14:45 +0300 |
commit | 51eaa08f029c7343df846325d7cf047be8b96e81 (patch) | |
tree | 3c462f106572b81cf3b9507a9c749b11223de080 /arch | |
parent | 76346cd93a5eca33700f82685d56172dd65d4c0a (diff) | |
download | linux-51eaa08f029c7343df846325d7cf047be8b96e81.tar.xz |
KVM: PPC: Book3S HV: Add of_node_put() in success path
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index de686b340f4a..fba21c91b2ff 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -4561,6 +4561,8 @@ static int kvmppc_book3s_init_hv(void) pr_err("KVM-HV: Cannot determine method for accessing XICS\n"); return -ENODEV; } + /* presence of intc confirmed - node can be dropped again */ + of_node_put(np); } #endif |