* [PATCH v2] RDMA/rtrs: client: Fix function return on success
@ 2020-05-19 16:36 Gustavo A. R. Silva
2020-05-19 17:47 ` Bart Van Assche
2020-05-19 23:47 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2020-05-19 16:36 UTC (permalink / raw)
To: Danil Kipnis, Jack Wang, Doug Ledford, Jason Gunthorpe, Bart Van Assche
Cc: linux-rdma, linux-kernel, 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 <gustavoars@kernel.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] RDMA/rtrs: client: Fix function return on success
2020-05-19 16:36 [PATCH v2] RDMA/rtrs: client: Fix function return on success Gustavo A. R. Silva
@ 2020-05-19 17:47 ` Bart Van Assche
2020-05-19 23:47 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2020-05-19 17:47 UTC (permalink / raw)
To: Gustavo A. R. Silva, Danil Kipnis, Jack Wang, Doug Ledford,
Jason Gunthorpe
Cc: linux-rdma, linux-kernel, Gustavo A. R. Silva
On 2020-05-19 09:36, Gustavo A. R. Silva wrote:
> Remove the if-statement and return the value contained in _err_,
> unconditionally.
Thanks Gustavo!
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] RDMA/rtrs: client: Fix function return on success
2020-05-19 16:36 [PATCH v2] RDMA/rtrs: client: Fix function return on success Gustavo A. R. Silva
2020-05-19 17:47 ` Bart Van Assche
@ 2020-05-19 23:47 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-05-19 23:47 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Danil Kipnis, Jack Wang, Doug Ledford, Bart Van Assche,
linux-rdma, linux-kernel, Gustavo A. R. Silva
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@kernel.org>
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> ---
> Changes in v2:
> - Return err, unconditionally. As suggested by Bart Van Assche.
> Thanks, Bart.
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-19 23:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 16:36 [PATCH v2] RDMA/rtrs: client: Fix function return on success Gustavo A. R. Silva
2020-05-19 17:47 ` Bart Van Assche
2020-05-19 23:47 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).