Skip to contentSkip to conversation

RDMA/core: Fix error return code in _ib_modify_qp()

PATCH In review Chen Zhou 2 participants 2 messages Nov 12, 2020 InfiniBand

lore
Share & tools
lore

Chen Zhou

author
#0 lore raw

PATCH 1/1 RDMA/core: Fix error return code in _ib_modify_qp()

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")
---
 drivers/infiniband/core/verbs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/infiniband/core/verbs.c +3 -1
index 740f8454b6b4..3d895cc41c3a 100644
@@ -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;
 		}
 	}
Signature · 1 line
2.20.1
#1 lore raw
Quoted 10 lines · Chen Zhou

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")
---
 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