diff mbox series

[V2,for-next,4/6] RDMA/hns: Modify qp will return errno When qp type is illegal

Message ID 1532953230-79945-5-git-send-email-oulijun@huawei.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series The follow up updates for hns | expand

Commit Message

Lijun Ou July 30, 2018, 12:20 p.m. UTC
When qp type is illegal according to RoCE protocol, The verb
of modify qp will directly return a errno. This patch fixes
it.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
V1 -> V2:
- Fix the errno type
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 763172c..12e7f3f 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -3445,6 +3445,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;
 	}