RDMA/rtrs: client: Fix function return on success
Subsystems (2)
PATCH v2 1/1 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 <[email protected]>
---
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(-)
drivers/infiniband/ulp/rtrs/rtrs-clt.c +0 -3
@@ -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; }
Signature · 1 line
2.26.2
Quoted 2 lines · Gustavo A. R. Silva
Remove the if-statement and return the value contained in _err_, unconditionally.
Thanks Gustavo!
Reviewed-by Bart Van Assche <[email protected]>
Jason Gunthorpe
AppliedQuoted 11 lines · Gustavo A. R. Silva
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 <[email protected]>Reviewed-by Bart Van Assche <[email protected]>---
Changes in v2:
- Return err, unconditionally. As suggested by Bart Van Assche. Thanks, Bart.
Applied to for-next, thanks
Jason