From: Lijun Ou <oulijun@huawei.com>
Date: Mon, 30 Jul 2018 20:20:28 +0800
Subject: RDMA/hns: Modify qp will return errno when qp type is illegal
Patch-mainline: v4.19-rc1
Git-commit: ac7cbf96c20991dbeea0af04ca9ff25252af9e5f
References: bsc#1104427 FATE#326416
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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 +
1 file changed, 1 insertion(+)
--- 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
;
} else {
dev_err(dev, "Illegal state for QP!\n");
+ ret = -EINVAL;
goto out;
}