kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tossati <mtosatti@redhat.com>
Cc: Carsten Otte <cotte@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	KVM <kvm@vger.kernel.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>
Subject: [patch 2/4] kvm-s390: fix return value of kvm_arch_init_vm
Date: Tue, 18 Oct 2011 12:27:13 +0200	[thread overview]
Message-ID: <20111018103127.070441577@de.ibm.com> (raw)
In-Reply-To: 20111018102711.259185287@de.ibm.com

[-- Attachment #1: 501-kvm-arch_init_vm.diff --]
[-- Type: text/plain, Size: 695 bytes --]

From: Carsten Otte <cotte@de.ibm.com>

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>
---

 arch/s390/kvm/kvm-s390.c |    2 ++
 1 file changed, 2 insertions(+)

Index: b/arch/s390/kvm/kvm-s390.c
===================================================================
--- 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;


  parent reply	other threads:[~2011-10-18 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18 10:27 [patch 0/4] Fixes for kvm-s390 Christian Borntraeger
2011-10-18 10:27 ` [patch 1/4] kvm-s390: check cpu_id prior to using it Christian Borntraeger
2011-10-18 10:27 ` Christian Borntraeger [this message]
2011-10-18 10:27 ` [patch 3/4] kvm-s390: fix register setting Christian Borntraeger
2011-10-18 10:27 ` [patch 4/4] kvm-s390: implement sigp external call Christian Borntraeger
2011-10-19 16:21 ` [patch 0/4] Fixes for kvm-s390 Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111018103127.070441577@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=avi@redhat.com \
    --cc=cotte@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).