aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorLijun Ou <oulijun@huawei.com>2018-07-30 20:20:28 +0800
committerJason Gunthorpe <jgg@mellanox.com>2018-07-30 20:42:44 -0600
commitac7cbf96c20991dbeea0af04ca9ff25252af9e5f (patch)
treea76d0aab496c8fd757a4d43cb42a16553a3fa992 /drivers/infiniband/hw
parentRDMA/hns: Assign the value for vlan field of qp context (diff)
downloadlinux-dev-ac7cbf96c20991dbeea0af04ca9ff25252af9e5f.tar.xz
linux-dev-ac7cbf96c20991dbeea0af04ca9ff25252af9e5f.zip
RDMA/hns: Modify qp will return errno when qp type is illegal
Set for ret was missing in the error path here, resulting in incorrect error code for modify_qp. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index b4958422af94..39842ece3c0f 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -3447,6 +3447,7 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,
;
} else {
dev_err(dev, "Illegal state for QP!\n");
+ ret = -EINVAL;
goto out;
}