diff options
author | Carsten Otte <cotte@de.ibm.com> | 2011-10-18 06:27:13 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-10-30 06:23:55 -0400 |
commit | b290411a1321dd937dce4aaa812e5d8fae8a14a5 (patch) | |
tree | 00fd0ae4b160736f5fc9055ecc7822d4361cf7f1 | |
parent | 4d47555a80495657161a7e71ec3014ff2021e450 (diff) |
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>
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
175 | if (rc) | 175 | if (rc) |
176 | goto out_err; | 176 | goto out_err; |
177 | 177 | ||
178 | rc = -ENOMEM; | ||
179 | |||
178 | kvm->arch.sca = (struct sca_block *) get_zeroed_page(GFP_KERNEL); | 180 | kvm->arch.sca = (struct sca_block *) get_zeroed_page(GFP_KERNEL); |
179 | if (!kvm->arch.sca) | 181 | if (!kvm->arch.sca) |
180 | goto out_err; | 182 | goto out_err; |