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 v2] RDMA/rtrs: client: Fix function return on success
Remove the if-statement and return the value contained in _err_,
unconditionally.

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>
---
Changes in v2:
- Return err, unconditionally. As suggested by Bart Van Assche.
Thanks, Bart.

drivers/infiniband/ulp/rtrs/rtrs-clt.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index 468fdd0d8713c..568741aa7f596 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -1591,9 +1591,6 @@ static int create_con_cq_qp(struct rtrs_clt_con *con)
* In case of error we do not bother to clean previous allocations,
* since destroy_con_cq_qp() must be called.
*/
-
- if (err)
- return err;
return err;
}

--
2.26.2
\
 
 \ /
  Last update: 2020-05-19 18:32    [W:0.049 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site