Re: [PATCH v2] RDMA/rtrs: client: Fix function return on success

From: Jason Gunthorpe
Date: Tue May 19 2020 - 19:47:16 EST


On Tue, May 19, 2020 at 11:36:12AM -0500, Gustavo A. R. Silva wrote:
> 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>
> Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
> Changes in v2:
> - Return err, unconditionally. As suggested by Bart Van Assche.
> Thanks, Bart.

Applied to for-next, thanks

Jason