提交 5333499c 编写于 作者: J Jing Xiangfeng 提交者: Jason Gunthorpe

RDMA/core: Fix error return in _ib_modify_qp()

Fix to return error code PTR_ERR() from the error handling case instead of
0.

Fixes: 51aab126 ("RDMA/core: Get xmit slave for LAG")
Link: https://lore.kernel.org/r/20201016075845.129562-1-jingxiangfeng@huawei.comSigned-off-by: NJing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: NMaor Gottlieb <maorg@nvidia.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
上级 bfb972c5
...@@ -1701,8 +1701,10 @@ static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr, ...@@ -1701,8 +1701,10 @@ static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr,
slave = rdma_lag_get_ah_roce_slave(qp->device, slave = rdma_lag_get_ah_roce_slave(qp->device,
&attr->ah_attr, &attr->ah_attr,
GFP_KERNEL); GFP_KERNEL);
if (IS_ERR(slave)) if (IS_ERR(slave)) {
ret = PTR_ERR(slave);
goto out_av; goto out_av;
}
attr->xmit_slave = slave; attr->xmit_slave = slave;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册