summaryrefslogtreecommitdiff
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorGuoqing Jiang <guoqing.jiang@linux.dev>2023-11-13 14:57:15 +0300
committerLeon Romanovsky <leon@kernel.org>2023-11-15 16:58:13 +0300
commit065186d228c5280d0390fde0e7ddba998e66f047 (patch)
tree5226e01b8115a48f18a3b90f6cda856438f48541 /drivers/infiniband/sw
parent659da08ed83a67aec9d106e44d2d88c5963fb85a (diff)
downloadlinux-065186d228c5280d0390fde0e7ddba998e66f047.tar.xz
RDMA/siw: No need to check term_info.valid before call siw_send_terminate
Remove the redundate checking since siw_send_terminate check it inside. Acked-by: Bernard Metzler <bmt@zurich.ibm.com> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> Link: https://lore.kernel.org/r/20231113115726.12762-7-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r--drivers/infiniband/sw/siw/siw_cm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c
index 7de651cb44e8..5e6e57153611 100644
--- a/drivers/infiniband/sw/siw/siw_cm.c
+++ b/drivers/infiniband/sw/siw/siw_cm.c
@@ -393,8 +393,7 @@ void siw_qp_cm_drop(struct siw_qp *qp, int schedule)
}
siw_dbg_cep(cep, "immediate close, state %d\n", cep->state);
- if (qp->term_info.valid)
- siw_send_terminate(qp);
+ siw_send_terminate(qp);
if (cep->cm_id) {
switch (cep->state) {
@@ -1061,7 +1060,7 @@ static void siw_cm_work_handler(struct work_struct *w)
/*
* QP scheduled LLP close
*/
- if (cep->qp && cep->qp->term_info.valid)
+ if (cep->qp)
siw_send_terminate(cep->qp);
if (cep->cm_id)