lkml.org 
[lkml]   [2020]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] RDMA/rtrs: client: Fix function return on success
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
\
 
 \ /
  Last update: 2020-05-19 18:09    [W:0.679 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site