From: Jan Kiszka Date: Mon, 8 Apr 2013 09:07:46 +0000 (+0200) Subject: KVM: VMX: Add missing braces to avoid redundant error check X-Git-Tag: v3.12-rc1~895^2~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a63cb56061239372fce2452dbedd35c95bd665aa;p=kernel%2Fkernel-generic.git 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 Signed-off-by: Gleb Natapov --- diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 1cf202c..669b803 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)