stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>, Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org, kernel-janitors@vger.kernel.org,
	stable <stable@vger.kernel.org>
Subject: Re: [patch] KVM: return an error code in kvm_vm_ioctl_register_coalesced_mmio()
Date: Thu, 30 Jan 2014 11:57:16 +0100	[thread overview]
Message-ID: <52EA300C.8020807@redhat.com> (raw)
In-Reply-To: <20140129131639.GB10678@elgon.mountain>

Il 29/01/2014 14:16, Dan Carpenter ha scritto:
> If kvm_io_bus_register_dev() fails then it returns success but it should
> return an error code.
>
> I also did a little cleanup like removing an impossible NULL test.
>
> Fixes: 2b3c246a682c ('KVM: Make coalesced mmio use a device per zone')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c
> index 88b2fe3ddf42..00d86427af0f 100644
> --- a/virt/kvm/coalesced_mmio.c
> +++ b/virt/kvm/coalesced_mmio.c
> @@ -154,17 +154,13 @@ int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm,
>  	list_add_tail(&dev->list, &kvm->coalesced_zones);
>  	mutex_unlock(&kvm->slots_lock);
>
> -	return ret;
> +	return 0;
>
>  out_free_dev:
>  	mutex_unlock(&kvm->slots_lock);
> -
>  	kfree(dev);
>
> -	if (dev == NULL)
> -		return -ENXIO;
> -
> -	return 0;
> +	return ret;
>  }
>
>  int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm,
>

Applying to kvm/master, and adding a "Cc: stable@vger.kernel.org" while 
at it.

Paolo

           reply	other threads:[~2014-01-30 10:57 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20140129131639.GB10678@elgon.mountain>]

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=52EA300C.8020807@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gleb@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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).