All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Lieven <pl@kamp.de>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry
Date: Fri, 04 Apr 2014 13:57:19 +0200	[thread overview]
Message-ID: <533E9E1F.6080909@redhat.com> (raw)
In-Reply-To: <1396612409-17932-1-git-send-email-famz@redhat.com>

Il 04/04/2014 13:53, Fam Zheng ha scritto:
> This eliminates the possible assertion failure in error_setg().
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  block/iscsi.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 21c18a3..64a509f 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -1101,8 +1101,10 @@ static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
>      return task;
>
>  fail:
> -    error_setg(errp, "iSCSI: Inquiry command failed : %s",
> -               iscsi_get_error(iscsi));
> +    if (!error_is_set(errp)) {
> +        error_setg(errp, "iSCSI: Inquiry command failed : %s",
> +                   iscsi_get_error(iscsi));
> +    }
>      if (task != NULL) {
>          scsi_free_scsi_task(task);
>      }
>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Kevin, Stefan, can you send the pull request for this?

Paolo

  reply	other threads:[~2014-04-04 11:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 11:53 [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry Fam Zheng
2014-04-04 11:57 ` Paolo Bonzini [this message]
2014-04-04 12:12   ` Kevin Wolf
2014-04-04 12:21 ` 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=533E9E1F.6080909@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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.