* [PATCH] RDMA/core: Fix error return code in _ib_modify_qp()
@ 2020-11-12 9:06 Chen Zhou
2020-11-12 11:46 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Chen Zhou @ 2020-11-12 9:06 UTC (permalink / raw)
To: dledford, jgg, leon, maorg
Cc: linux-rdma, linux-kernel, chenzhou10, Hulk Robot
Fix to return a negative error code from the error handling case
instead of 0 in function _ib_modify_qp(), as done elsewhere in this
function.
Fixes: 51aab12631dd ("RDMA/core: Get xmit slave for LAG")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
drivers/infiniband/core/verbs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 740f8454b6b4..3d895cc41c3a 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1698,8 +1698,10 @@ static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr,
slave = rdma_lag_get_ah_roce_slave(qp->device,
&attr->ah_attr,
GFP_KERNEL);
- if (IS_ERR(slave))
+ if (IS_ERR(slave)) {
+ ret = PTR_ERR(slave);
goto out_av;
+ }
attr->xmit_slave = slave;
}
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] RDMA/core: Fix error return code in _ib_modify_qp()
2020-11-12 9:06 [PATCH] RDMA/core: Fix error return code in _ib_modify_qp() Chen Zhou
@ 2020-11-12 11:46 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2020-11-12 11:46 UTC (permalink / raw)
To: Chen Zhou; +Cc: dledford, jgg, maorg, linux-rdma, linux-kernel, Hulk Robot
On Thu, Nov 12, 2020 at 05:06:26PM +0800, Chen Zhou wrote:
> Fix to return a negative error code from the error handling case
> instead of 0 in function _ib_modify_qp(), as done elsewhere in this
> function.
>
> Fixes: 51aab12631dd ("RDMA/core: Get xmit slave for LAG")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
> ---
> drivers/infiniband/core/verbs.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
It is already fixed in the commit
5333499c6014 ("RDMA/core: Fix error return in _ib_modify_qp()")
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-12 11:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-12 9:06 [PATCH] RDMA/core: Fix error return code in _ib_modify_qp() Chen Zhou
2020-11-12 11:46 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox