2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 09:43:59 +08:00

KVM: s390: fix return value of kvm_arch_init_vm

This patch fixes the return value of kvm_arch_init_vm in case a memory
allocation goes wrong.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Carsten Otte 2011-10-18 12:27:13 +02:00 committed by Avi Kivity
parent 4d47555a80
commit b290411a13

View File

@ -175,6 +175,8 @@ int kvm_arch_init_vm(struct kvm *kvm)
if (rc)
goto out_err;
rc = -ENOMEM;
kvm->arch.sca = (struct sca_block *) get_zeroed_page(GFP_KERNEL);
if (!kvm->arch.sca)
goto out_err;