This is more or less a consistency change, we should always go via __siw_cep_close() to release the socket in order to avoid problems in future. 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 | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c index 4b789379f676..49d01264682a 100644 --- a/drivers/infiniband/sw/siw/siw_cm.c +++ b/drivers/infiniband/sw/siw/siw_cm.c @@ -1972,17 +1972,9 @@ int siw_create_listen(struct iw_cm_id *id, int backlog) error: siw_dbg(id->device, "failed: %d\n", rv); - if (cep->cm_id) { - cep->cm_id->rem_ref(cep->cm_id); - cep->cm_id = NULL; - } - cep->sock = NULL; - siw_socket_disassoc(s); - cep->state = SIW_EPSTATE_CLOSED; - + __siw_cep_close(cep); siw_cep_set_free(cep); siw_cep_put(cep); - sock_release(s); return rv; } -- 2.25.1