You need to sign in or sign up before continuing.
提交 cbee81f6 编写于 作者: F Fam Zheng 提交者: Kevin Wolf

iscsi: Don't set error if already set in iscsi_do_inquiry

This eliminates the possible assertion failure in error_setg().
Signed-off-by: NFam Zheng <famz@redhat.com>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 5913815a
...@@ -1101,8 +1101,10 @@ static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun, ...@@ -1101,8 +1101,10 @@ static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
return task; return task;
fail: fail:
if (!error_is_set(errp)) {
error_setg(errp, "iSCSI: Inquiry command failed : %s", error_setg(errp, "iSCSI: Inquiry command failed : %s",
iscsi_get_error(iscsi)); iscsi_get_error(iscsi));
}
if (task != NULL) { if (task != NULL) {
scsi_free_scsi_task(task); scsi_free_scsi_task(task);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册