From: Mike Christie Date: Tue, 2 Dec 2008 06:32:15 +0000 (-0600) Subject: [SCSI] libiscsi: handle init task failures. X-Git-Tag: v2.6.29-rc1~555^2~59 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ae15f80172d95f978b60d40408353943d5bc099b;p=linux-2.6-omap-h63xx.git [SCSI] libiscsi: handle init task failures. Mgmt setup used to not fail so we did not have to check the return value. Now with cxgb3i it can so this has us pass up a error. Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index ddf53978f0b..7225b6e2029 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -475,8 +475,8 @@ static int iscsi_prep_mgmt_task(struct iscsi_conn *conn, } } - if (session->tt->init_task) - session->tt->init_task(task); + if (session->tt->init_task && session->tt->init_task(task)) + return -EIO; if ((hdr->opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_LOGOUT) session->state = ISCSI_STATE_LOGGING_OUT;