[for-next,4/5] RDMA/hns: Modify return value of restrack fucntions
diff mbox series

Message ID 1567566885-23088-5-git-send-email-liweihang@hisilicon.com
State Accepted
Delegated to: Doug Ledford
Headers show
Series
  • Some bugfixes and cleanups for hip08
Related show

Commit Message

Weihang Li Sept. 4, 2019, 3:14 a.m. UTC
From: Lang Cheng <chenglang@huawei.com>

THe restrack function return EINVAL instead of EMSGSIZE when the driver
operation fails.

Fixes: 4b42d05d0b2 ("RDMA/hns: Remove unnecessary kzalloc")

Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
---
 drivers/infiniband/hw/hns/hns_roce_restrack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/infiniband/hw/hns/hns_roce_restrack.c b/drivers/infiniband/hw/hns/hns_roce_restrack.c
index 0a31d0a..a0d608ec 100644
--- a/drivers/infiniband/hw/hns/hns_roce_restrack.c
+++ b/drivers/infiniband/hw/hns/hns_roce_restrack.c
@@ -95,7 +95,7 @@  static int hns_roce_fill_res_cq_entry(struct sk_buff *msg,
 
 	ret = hr_dev->dfx->query_cqc_info(hr_dev, hr_cq->cqn, (int *)context);
 	if (ret)
-		goto err;
+		return -EINVAL;
 
 	table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER);
 	if (!table_attr)