[PATCH 21/36] RDMA/ocrdma: remove conditional return with no effect

Sang-Heon Jeon <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,fr.inria.cocci,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <[email protected]>
---
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index cfe3d19b73b3..017b3660173e 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -1749,11 +1749,8 @@ static int ocrdma_copy_srq_uresp(struct ocrdma_dev *dev, struct ocrdma_srq *srq,
 	status = ib_respond_udata(udata, uresp);
 	if (status)
 		return status;
-	status = ocrdma_add_mmap(srq->pd->uctx, uresp.rq_page_addr[0],
-				 uresp.rq_page_size);
-	if (status)
-		return status;
-	return status;
+	return ocrdma_add_mmap(srq->pd->uctx, uresp.rq_page_addr[0],
+			       uresp.rq_page_size);
 }
 
 int ocrdma_create_srq(struct ib_srq *ibsrq, struct ib_srq_init_attr *init_attr,
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.