KVM: ARM: Call hyp_cpu_pm_exit at the right place
authorShannon Zhao <shannon.zhao@linux.alibaba.com>
Mon, 2 Dec 2019 07:42:11 +0000 (15:42 +0800)
committerMarc Zyngier <maz@kernel.org>
Sun, 19 Jan 2020 18:03:31 +0000 (18:03 +0000)
commitc3e35409b54e8833ab936e667e3e7fcb8bdace00
treebd2dfd63bab45040051f45a03e24b85102064f46
parentf5523423defb0d929e23813c8dd16c0131043a8c
KVM: ARM: Call hyp_cpu_pm_exit at the right place

It doesn't needs to call hyp_cpu_pm_exit() in init_hyp_mode() when some
error occurs. hyp_cpu_pm_exit() only needs to be called in
kvm_arch_init() if init_subsystems() fails. So move hyp_cpu_pm_exit()
out from teardown_hyp_mode() and call it directly in kvm_arch_init().

Signed-off-by: Shannon Zhao <shannon.zhao@linux.alibaba.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1575272531-3204-1-git-send-email-shannon.zhao@linux.alibaba.com
virt/kvm/arm/arm.c