aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-12-02 01:32:15 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:23 -0500
commitae15f80172d95f978b60d40408353943d5bc099b (patch)
treec520477e90c974e2d165187ba8ee3ad7ec8c7375
parent2ff79d52d56eebcffd83e9327b89d7daedf1e897 (diff)
[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 <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--drivers/scsi/libiscsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index ddf53978f0be..7225b6e2029e 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,
475 } 475 }
476 } 476 }
477 477
478 if (session->tt->init_task) 478 if (session->tt->init_task && session->tt->init_task(task))
479 session->tt->init_task(task); 479 return -EIO;
480 480
481 if ((hdr->opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_LOGOUT) 481 if ((hdr->opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_LOGOUT)
482 session->state = ISCSI_STATE_LOGGING_OUT; 482 session->state = ISCSI_STATE_LOGGING_OUT;