Skip to content

Commit

Permalink
RDMA/rtrs: client: Fix function return on success
Browse files Browse the repository at this point in the history
Remove the if-statement and return the value contained in _err_,
unconditionally.

Link: https://lore.kernel.org/r/20200519163612.GA6043@embeddedor
Addresses-Coverity-ID: 1493753 ("Identical code for different branches")
Fixes: 6a98d71 ("RDMA/rtrs: client: main functionality")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Gustavo A. R. Silva authored and Jason Gunthorpe committed May 19, 2020
1 parent bf1d8ed commit e198408
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/infiniband/ulp/rtrs/rtrs-clt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1590,9 +1590,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;
}

Expand Down

0 comments on commit e198408

Please sign in to comment.