RDMA/rtrs: client: Fix function return on success
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 19 May 2020 16:36:12 +0000 (11:36 -0500)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 19 May 2020 23:41:41 +0000 (20:41 -0300)
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: 6a98d71daea1 ("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>
drivers/infiniband/ulp/rtrs/rtrs-clt.c

index 96cba06e8ba7e7d576036ad5280e2ecd93943331..1b98785fd8ac38d4e88a9415afd6ca9964ab5995 100644 (file)
@@ -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;
 }