diff options
author | Yixian Liu <liuyixian@huawei.com> | 2019-11-05 19:08:01 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-11-08 16:37:54 -0400 |
commit | 1ceb0b11a8a2363db3bf44f3e0ae4615134733e9 (patch) | |
tree | e3bf9aac15c8681300dc67b318f2035706b55d6d /drivers/infiniband/hw/hns/hns_roce_srq.c | |
parent | RDMA/hns: Modify hns_roce_hw_v2_get_cfg to simplify the code (diff) | |
download | linux-dev-1ceb0b11a8a2363db3bf44f3e0ae4615134733e9.tar.xz linux-dev-1ceb0b11a8a2363db3bf44f3e0ae4615134733e9.zip |
RDMA/hns: Fix non-standard error codes
It is better to return a linux error code than define a private constant.
Link: https://lore.kernel.org/r/1572952082-6681-9-git-send-email-liweihang@hisilicon.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_srq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_srq.c b/drivers/infiniband/hw/hns/hns_roce_srq.c index d275818554a6..96ff782e0fdf 100644 --- a/drivers/infiniband/hw/hns/hns_roce_srq.c +++ b/drivers/infiniband/hw/hns/hns_roce_srq.c @@ -111,7 +111,7 @@ static int hns_roce_srq_alloc(struct hns_roce_dev *hr_dev, u32 pdn, u32 cqn, } ret = hns_roce_bitmap_alloc(&srq_table->bitmap, &srq->srqn); - if (ret == -1) { + if (ret) { dev_err(hr_dev->dev, "SRQ alloc.Failed to alloc index.\n"); return -ENOMEM; } |