RDMA/core: Fix error return in _ib_modify_qp()
PATCH 1/1 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 51aab12631dd ("RDMA/core: Get xmit slave for LAG")
Signed-off-by Jing Xiangfeng <[email protected]>
--- drivers/infiniband/core/verbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/infiniband/core/verbs.c +3 -1
@@ -1685,8 +1685,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; } }
Signature · 1 line
2.17.1
Quoted 15 lines · Jing Xiangfeng
Fix to return error code
PTR_ERR()from the error handling case instead of 0.Fixes 51aab12631dd ("RDMA/core: Get xmit slave for LAG")Signed-off-by Jing Xiangfeng <[email protected]>--- drivers/infiniband/core/verbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/infiniband/core/verbs.c +0
-0@@ -1685,8 +1685,10 @@ static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr, slave = rdma_lag_get_ah_roce_slave(qp->device,
drivers/infiniband/core/verbs.c static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr, · line 1694
Quoted 10 lines
drivers/infiniband/core/verbs.c +3
-1&attr->ah_attr, GFP_KERNEL); -if (IS_ERR (slave)) +if (IS_ERR (slave)) { + ret =PTR_ERR (slave); goto out_av; + } attr->xmit_slave = slave; } }
Looks good,
Reviewed-by Maor Gottlieb <[email protected]>
Quoted 9 lines · Jing Xiangfeng
Fix to return error code
PTR_ERR()from the error handling case instead of 0.Fixes 51aab12631dd ("RDMA/core: Get xmit slave for LAG")Signed-off-by Jing Xiangfeng <[email protected]>Reviewed-by Maor Gottlieb <[email protected]>--- drivers/infiniband/core/verbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Applied to for-next, thanks
Jason