Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH] RDMA/rtrs: client: Fix function return on success
@ 2020-05-19 16:13 Gustavo A. R. Silva
  2020-05-19 16:16 ` Bart Van Assche
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2020-05-19 16:13 UTC (permalink / raw)
  To: Danil Kipnis, Jack Wang, Doug Ledford, Jason Gunthorpe
  Cc: linux-rdma, linux-kernel, Gustavo A. R. Silva

The function should return 0 on success, instead of err.

Addresses-Coverity-ID: 1493753 ("Identical code for different branches")
Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/infiniband/ulp/rtrs/rtrs-clt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index 468fdd0d8713c..465515e46bb1a 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -1594,7 +1594,8 @@ static int create_con_cq_qp(struct rtrs_clt_con *con)
 
 	if (err)
 		return err;
-	return err;
+
+	return 0;
 }
 
 static void destroy_con_cq_qp(struct rtrs_clt_con *con)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-19 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-19 16:13 [PATCH] RDMA/rtrs: client: Fix function return on success Gustavo A. R. Silva
2020-05-19 16:16 ` Bart Van Assche
2020-05-19 16:21   ` Jinpu Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox