iscsi: Don't set error if already set in iscsi_do_inquiry
This eliminates the possible assertion failure in error_setg(). Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
5913815a17
commit
cbee81f6de
|
@ -1101,8 +1101,10 @@ static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
|
||||||
return task;
|
return task;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
error_setg(errp, "iSCSI: Inquiry command failed : %s",
|
if (!error_is_set(errp)) {
|
||||||
iscsi_get_error(iscsi));
|
error_setg(errp, "iSCSI: Inquiry command failed : %s",
|
||||||
|
iscsi_get_error(iscsi));
|
||||||
|
}
|
||||||
if (task != NULL) {
|
if (task != NULL) {
|
||||||
scsi_free_scsi_task(task);
|
scsi_free_scsi_task(task);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue