[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set i
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry |
Date: |
Fri, 4 Apr 2014 14:12:52 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 04.04.2014 um 13:57 hat Paolo Bonzini geschrieben:
> Il 04/04/2014 13:53, Fam Zheng ha scritto:
> >This eliminates the possible assertion failure in error_setg().
> >
> >Signed-off-by: Fam Zheng <address@hidden>
> >---
> > 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 <address@hidden>
>
> Kevin, Stefan, can you send the pull request for this?
Thanks, applied to the block branch.
Kevin