Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276460
b: refs/heads/master
c: 0957627
h: refs/heads/master
v: v3
  • Loading branch information
Nicholas Bellinger committed Dec 6, 2011
1 parent 98384bb commit abcf02a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03e98c9eb916f3f0868c1dc344dde2a60287ff72
refs/heads/master: 0957627a99604f379d35831897a2aa15272528fc
13 changes: 8 additions & 5 deletions trunk/drivers/target/iscsi/iscsi_target_login.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static int iscsi_login_zero_tsih_s1(
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
ISCSI_LOGIN_STATUS_NO_RESOURCES);
pr_err("Could not allocate memory for session\n");
return -1;
return -ENOMEM;
}

iscsi_login_set_conn_values(sess, conn, pdu->cid);
Expand All @@ -250,7 +250,8 @@ static int iscsi_login_zero_tsih_s1(
pr_err("idr_pre_get() for sess_idr failed\n");
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
ISCSI_LOGIN_STATUS_NO_RESOURCES);
return -1;
kfree(sess);
return -ENOMEM;
}
spin_lock(&sess_idr_lock);
idr_get_new(&sess_idr, NULL, &sess->session_index);
Expand All @@ -270,14 +271,16 @@ static int iscsi_login_zero_tsih_s1(
ISCSI_LOGIN_STATUS_NO_RESOURCES);
pr_err("Unable to allocate memory for"
" struct iscsi_sess_ops.\n");
return -1;
kfree(sess);
return -ENOMEM;
}

sess->se_sess = transport_init_session();
if (!sess->se_sess) {
if (IS_ERR(sess->se_sess)) {
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
ISCSI_LOGIN_STATUS_NO_RESOURCES);
return -1;
kfree(sess);
return -ENOMEM;
}

return 0;
Expand Down

0 comments on commit abcf02a

Please sign in to comment.