From: Carsten Otte Date: Tue, 18 Oct 2011 10:27:13 +0000 (+0200) Subject: KVM: s390: fix return value of kvm_arch_init_vm X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b290411a1321dd937dce4aaa812e5d8fae8a14a5;p=linux-beck.git 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 Signed-off-by: Christian Borntraeger Signed-off-by: Marcelo Tosatti --- diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 0cba935d1282..397f0cbc8b76 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -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;