Skip to content

Commit

Permalink
RDMA/hns: Modify return value of restrack functions
Browse files Browse the repository at this point in the history
The restrack function return EINVAL instead of EMSGSIZE when the driver
operation fails.

Fixes: 4b42d05 ("RDMA/hns: Remove unnecessary kzalloc")
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Link: https://lore.kernel.org/r/1567566885-23088-5-git-send-email-liweihang@hisilicon.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Lang Cheng authored and Doug Ledford committed Oct 21, 2019
1 parent 3288322 commit cfd82da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/hns/hns_roce_restrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cfd82da

Please sign in to comment.