isert: fix redundant module put on error flow when handling connect request

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6958 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Israel Rukshin
2016-08-17 07:28:52 +00:00
parent 0498de2100
commit 40fd212bdf

View File

@@ -1326,7 +1326,6 @@ fail_login_rsp_pdu:
fail_login_req_pdu:
isert_conn_kfree(isert_conn);
fail_alloc:
module_put(THIS_MODULE);
TRACE_EXIT_RES(err);
return ERR_PTR(err);
}
@@ -1431,7 +1430,7 @@ static int isert_cm_conn_req_handler(struct rdma_cm_id *cm_id,
if (unlikely(!try_module_get(THIS_MODULE))) {
err = -EINVAL;
goto fail_get;
goto out;
}
mutex_lock(&dev_list_mutex);
@@ -1541,7 +1540,6 @@ fail_conn_create:
mutex_unlock(&dev_list_mutex);
fail_dev_create:
rdma_reject(cm_id, NULL, 0);
fail_get:
module_put(THIS_MODULE);
goto out;
}