Now that the logic is identical we better use the common function in order to avoid future problems. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Stefan Metzmacher <metze@xxxxxxxxx> Cc: Bernard Metzler <bmt@xxxxxxxxxxxxxx> Cc: linux-rdma@xxxxxxxxxxxxxxx --- drivers/infiniband/sw/siw/siw_cm.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c index 9f9750237e75..d2b1c62177ea 100644 --- a/drivers/infiniband/sw/siw/siw_cm.c +++ b/drivers/infiniband/sw/siw/siw_cm.c @@ -542,28 +542,7 @@ void siw_qp_cm_drop(struct siw_qp *qp, int schedule) siw_dbg_cep(cep, "immediate close, state %d\n", cep->state); __siw_cep_terminate_upcall(cep, -EINVAL); - - if (cep->cm_id) { - cep->cm_id->rem_ref(cep->cm_id); - cep->cm_id = NULL; - } - cep->state = SIW_EPSTATE_CLOSED; - - if (cep->sock) { - siw_socket_disassoc(cep->sock); - /* - * Immediately close socket - */ - sock_release(cep->sock); - cep->sock = NULL; - } - if (cep->qp) { - BUG_ON(cep->qp->cep != cep); - cep->qp->cep = NULL; - siw_qp_put(cep->qp); - cep->qp = NULL; - siw_cep_put(cep); - } + __siw_cep_close(cep); out: siw_cep_set_free(cep); } -- 2.25.1