isert: Make sure we cleanup all states if resource allocation fails

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Yan Burman
2014-03-19 14:30:54 +00:00
parent a892d7b0b3
commit 4beae6794e

View File

@@ -243,6 +243,7 @@ int isert_conn_alloc(struct iscsi_session *session,
conn->rd_state = 1;
isert_dev_release(dev);
isert_set_priv(conn, NULL);
res = isert_login_rsp_tx(cmnd, true, false);
vunmap(dev->sg_virt);
@@ -262,6 +263,7 @@ int isert_conn_alloc(struct iscsi_session *session,
goto out;
cleanup_iscsi_conn:
conn->rd_state = 0;
if (conn->nop_in_interval > 0)
cancel_delayed_work_sync(&conn->nop_in_delayed_work);
cleanup_conn: