isert-scst: Move a statement that reports an error message

Move PRINT_ERROR to the body of RDMA_CM_EVENT_CONNECT_REQUET because only
it can return an error and not log information about it.

Signed-off-by: Chesnokov Gleb <Chesnokov.G@raidix.com>
[bvanassche: modified patch title]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9486 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2021-07-13 04:52:18 +00:00
parent a4b3805d11
commit 53559bae31
+3 -4
View File
@@ -1721,6 +1721,9 @@ static int isert_cm_evt_handler(struct rdma_cm_id *cm_id,
switch (ev_type) {
case RDMA_CM_EVENT_CONNECT_REQUEST:
err = isert_cm_conn_req_handler(cm_id, cm_ev);
if (unlikely(err))
PRINT_ERROR("Failed to handle RDMA_CM_EVENT_CONNECT_REQUEST, err:%d",
err);
break;
case RDMA_CM_EVENT_ESTABLISHED:
@@ -1793,10 +1796,6 @@ static int isert_cm_evt_handler(struct rdma_cm_id *cm_id,
break;
}
if (unlikely(err))
PRINT_ERROR("Failed to handle rdma cm evt:%d, err:%d",
ev_type, err);
out:
TRACE_EXIT_RES(err);
return err;