Skip to content

Commit

Permalink
KVM: s390: fix return value of kvm_arch_init_vm
Browse files Browse the repository at this point in the history
This patch fixes the return value of kvm_arch_init_vm in case a memory
allocation goes wrong.

Signed-off-by: Carsten Otte <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
Carsten Otte authored and avikivity committed Oct 30, 2011
1 parent 4d47555 commit b290411
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b290411

Please sign in to comment.