aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-04-17 19:41:00 -0400
committerGleb Natapov <gleb@redhat.com>2013-04-22 03:56:44 -0400
commitf1797359216c1daa145a354d07b8b2b7459668f4 (patch)
tree9e45d3570f332ac3c2e09490b86223877e7fba9a /arch/x86/kvm
parent8a1b9dd0006bce5cc770fd80bc95f9916670c151 (diff)
KVM: x86: fix error return code in kvm_arch_vcpu_init()
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/x86.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 50e2e10b8041..cbe16b4cad5c 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6752,8 +6752,10 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
6752 } 6752 }
6753 vcpu->arch.mcg_cap = KVM_MAX_MCE_BANKS; 6753 vcpu->arch.mcg_cap = KVM_MAX_MCE_BANKS;
6754 6754
6755 if (!zalloc_cpumask_var(&vcpu->arch.wbinvd_dirty_mask, GFP_KERNEL)) 6755 if (!zalloc_cpumask_var(&vcpu->arch.wbinvd_dirty_mask, GFP_KERNEL)) {
6756 r = -ENOMEM;
6756 goto fail_free_mce_banks; 6757 goto fail_free_mce_banks;
6758 }
6757 6759
6758 r = fx_init(vcpu); 6760 r = fx_init(vcpu);
6759 if (r) 6761 if (r)