diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2013-04-08 11:07:46 +0200 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-04-08 12:46:06 +0300 |
commit | a63cb56061239372fce2452dbedd35c95bd665aa (patch) | |
tree | 17740814ec573f67cf7191ef7fb1b7ccd0a2b0a4 | |
parent | 458f212e36b291067b74c0cac2bdcf8278817ee7 (diff) |
KVM: VMX: Add missing braces to avoid redundant error check
The code was already properly aligned, now also add the braces to avoid
that err is checked even if alloc_apic_access_page didn't run and change
it. Found via Coccinelle by Fengguang Wu.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
-rw-r--r-- | arch/x86/kvm/vmx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 1cf202cb47d5..669b80378731 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -6785,10 +6785,11 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id) put_cpu(); if (err) goto free_vmcs; - if (vm_need_virtualize_apic_accesses(kvm)) + if (vm_need_virtualize_apic_accesses(kvm)) { err = alloc_apic_access_page(kvm); if (err) goto free_vmcs; + } if (enable_ept) { if (!kvm->arch.ept_identity_map_addr) |