提交 a63cb560 编写于 作者: J Jan Kiszka 提交者: Gleb Natapov

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: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NGleb Natapov <gleb@redhat.com>
上级 458f212e
...@@ -6785,10 +6785,11 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id) ...@@ -6785,10 +6785,11 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
put_cpu(); put_cpu();
if (err) if (err)
goto free_vmcs; goto free_vmcs;
if (vm_need_virtualize_apic_accesses(kvm)) if (vm_need_virtualize_apic_accesses(kvm)) {
err = alloc_apic_access_page(kvm); err = alloc_apic_access_page(kvm);
if (err) if (err)
goto free_vmcs; goto free_vmcs;
}
if (enable_ept) { if (enable_ept) {
if (!kvm->arch.ept_identity_map_addr) if (!kvm->arch.ept_identity_map_addr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册