iscsi-scst: Fix incorrect error handling (merge r4492 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4700 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-01-06 13:35:09 +00:00
parent 908b0b1ec6
commit 87fdc2901b

View File

@@ -3615,14 +3615,14 @@ static int iscsi_scsi_aen(struct scst_aen *aen)
}
if (!found) {
TRACE_MGMT_DBG("Unable to find alive conn for sess %p", sess);
goto out_err;
goto out_err_unlock;
}
/* Create a fake request */
fake_req = cmnd_alloc(conn, NULL);
if (fake_req == NULL) {
PRINT_ERROR("%s", "Unable to alloc fake AEN request");
goto out_err;
goto out_err_unlock;
}
mutex_unlock(&sess->target->target_mutex);
@@ -3664,9 +3664,12 @@ out:
out_err_free_req:
req_cmnd_release(fake_req);
goto out_set_res;
out_err:
out_err_unlock:
mutex_unlock(&sess->target->target_mutex);
out_set_res:
res = SCST_AEN_RES_FAILED;
goto out;
}