All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: Zhang Changzhong <zhangchangzhong@huawei.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Maurizio Lombardi <mlombard@redhat.com>
Cc: virtualization@lists.linux-foundation.org, kvm@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vhost scsi: fix error return code in vhost_scsi_set_endpoint()
Date: Fri, 4 Dec 2020 10:12:07 -0600	[thread overview]
Message-ID: <1c6e01d0-9329-862c-6480-fbb91a8910cf@oracle.com> (raw)
In-Reply-To: <1607071411-33484-1-git-send-email-zhangchangzhong@huawei.com>

On 12/4/20 2:43 AM, Zhang Changzhong wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: 25b98b64e284 ("vhost scsi: alloc cmds per vq instead of session")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
> ---
>   drivers/vhost/scsi.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> index 6ff8a5096..4ce9f00 100644
> --- a/drivers/vhost/scsi.c
> +++ b/drivers/vhost/scsi.c
> @@ -1643,7 +1643,8 @@ vhost_scsi_set_endpoint(struct vhost_scsi *vs,
>   			if (!vhost_vq_is_setup(vq))
>   				continue;
>   
> -			if (vhost_scsi_setup_vq_cmds(vq, vq->num))
> +			ret = vhost_scsi_setup_vq_cmds(vq, vq->num);
> +			if (ret)
>   				goto destroy_vq_cmds;
>   		}
>   
> 

Reviewed-by: Mike Christie <michael.christie@oracle.com>

  reply	other threads:[~2020-12-04 16:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  8:43 [PATCH] vhost scsi: fix error return code in vhost_scsi_set_endpoint() Zhang Changzhong
2020-12-04 16:12 ` Mike Christie [this message]
2020-12-07  5:17 ` Jason Wang
2020-12-07  5:17   ` Jason Wang
2020-12-07 16:07 ` Stefan Hajnoczi
2020-12-07 16:07   ` Stefan Hajnoczi

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=1c6e01d0-9329-862c-6480-fbb91a8910cf@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlombard@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=zhangchangzhong@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.