summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_pr.c
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@linux.ibm.com>2022-01-25 16:57:35 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2022-02-03 06:50:44 +0100
commit4feb74aa64b35b21a4937f96d7a940adee286e5b (patch)
treefd9c309897044cee4ba29566be056971ac9582ba /arch/powerpc/kvm/book3s_pr.c
parentKVM: PPC: Book3S HV: Free allocated memory if module init fails (diff)
downloadlinux-4feb74aa64b35b21a4937f96d7a940adee286e5b.tar.xz
linux-4feb74aa64b35b21a4937f96d7a940adee286e5b.zip
KVM: PPC: Decrement module refcount if init_vm fails
We increment the reference count for KVM-HV/PR before the call to kvmppc_core_init_vm. If that function fails we need to decrement the refcount. Also remove the check on kvm_ops->owner because try_module_get can handle a NULL module. Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220125155735.1018683-5-farosas@linux.ibm.com
Diffstat (limited to 'arch/powerpc/kvm/book3s_pr.c')
0 files changed, 0 insertions, 0 deletions