summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorkbuild test robot <lkp@intel.com>2019-09-29 18:43:28 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-10-22 13:31:21 +0200
commitb4fdcf6056d9057fe762bd6d8060e3ab9949efea (patch)
tree0856acfe0f38206a2a3977838aba7b02e24d56a4 /arch
parent1a8211c7d8717b19c1e9fa41d19fe6a55409765e (diff)
downloadlinux-b4fdcf6056d9057fe762bd6d8060e3ab9949efea.tar.bz2
KVM: x86: fix bugon.cocci warnings
Use BUG_ON instead of a if condition followed by BUG. Generated by: scripts/coccinelle/misc/bugon.cocci Fixes: 4b526de50e39 ("KVM: x86: Check kvm_rebooting in kvm_spurious_fault()") CC: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: kbuild test robot <lkp@intel.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 661e2bf38526..41aecc4c52d9 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -360,8 +360,7 @@ EXPORT_SYMBOL_GPL(kvm_set_apic_base);
asmlinkage __visible void kvm_spurious_fault(void)
{
/* Fault while not rebooting. We want the trace. */
- if (!kvm_rebooting)
- BUG();
+ BUG_ON(!kvm_rebooting);
}
EXPORT_SYMBOL_GPL(kvm_spurious_fault);