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@xxxxxxxxxx> --- 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