aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-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;