public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: mtosatti@redhat.com, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, yongjun_wei@trendmicro.com.cn, x86@kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: fix error return code in kvm_arch_vcpu_init()
Date: Mon, 22 Apr 2013 10:57:19 +0300	[thread overview]
Message-ID: <20130422075719.GI8997@redhat.com> (raw)
In-Reply-To: <CAPgLHd9W2bu9GkK=4TsK6KBh6LmvitaUpuc2XXnDDSj15U9drg@mail.gmail.com>

On Thu, Apr 18, 2013 at 07:41:00AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Applied, thanks.

> ---
>  arch/x86/kvm/x86.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index e172132..c45d656 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -6706,8 +6706,10 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
>  	}
>  	vcpu->arch.mcg_cap = KVM_MAX_MCE_BANKS;
>  
> -	if (!zalloc_cpumask_var(&vcpu->arch.wbinvd_dirty_mask, GFP_KERNEL))
> +	if (!zalloc_cpumask_var(&vcpu->arch.wbinvd_dirty_mask, GFP_KERNEL)) {
> +		r = -ENOMEM;
>  		goto fail_free_mce_banks;
> +	}
>  
>  	r = fx_init(vcpu);
>  	if (r)

--
			Gleb.

      parent reply	other threads:[~2013-04-22  7:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 23:41 [PATCH] KVM: x86: fix error return code in kvm_arch_vcpu_init() Wei Yongjun
2013-04-18  8:23 ` Paolo Bonzini
2013-04-22  7:57 ` Gleb Natapov [this message]

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=20130422075719.GI8997@redhat.com \
    --to=gleb@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=weiyj.lk@gmail.com \
    --cc=x86@kernel.org \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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