RDMA/hns: Modify return value of restrack functions
authorLang Cheng <chenglang@huawei.com>
Wed, 4 Sep 2019 03:14:44 +0000 (11:14 +0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 21 Oct 2019 19:29:38 +0000 (15:29 -0400)
The restrack function return EINVAL instead of EMSGSIZE when the driver
operation fails.

Fixes: 4b42d05d0b2c ("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>
drivers/infiniband/hw/hns/hns_roce_restrack.c

index 0a31d0a..a0d608e 100644 (file)
@@ -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)