Browse Source

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>
Lijun Ou 7 years ago
parent
commit
ac7cbf96c2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/infiniband/hw/hns/hns_roce_hw_v2.c

+ 1 - 0
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;
 	}