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: 4b526de50e
("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>
This commit is contained in:
parent
1a8211c7d8
commit
b4fdcf6056
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue