Skip to content

Commit

Permalink
[SCSI] libiscsi: handle init task failures.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
Mike Christie authored and James Bottomley committed Dec 29, 2008
1 parent 2ff79d5 commit ae15f80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ae15f80

Please sign in to comment.