summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hns/hns_roce_srq.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-12-17 10:08:15 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-12-18 14:21:45 -0700
commite9dfa53a399545056cf97cf8c996d71dcebb4d7e (patch)
tree8ad91eb31d652b5e9ec579bdd441b215db32ed06 /drivers/infiniband/hw/hns/hns_roce_srq.c
parent5050ae5fa3d54c8e83e1e447cc7e3591110a7f57 (diff)
RDMA/hns: Fix an error code in hns_roce_create_srq()
The function accidentally returns success on this error path. Fixes: c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_srq.c')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_srq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_srq.c b/drivers/infiniband/hw/hns/hns_roce_srq.c
index 463df60094e8..6377e734e28e 100644
--- a/drivers/infiniband/hw/hns/hns_roce_srq.c
+++ b/drivers/infiniband/hw/hns/hns_roce_srq.c
@@ -286,6 +286,7 @@ struct ib_srq *hns_roce_create_srq(struct ib_pd *pd,
if (IS_ERR(srq->idx_que.umem)) {
dev_err(hr_dev->dev,
"ib_umem_get error for index queue\n");
+ ret = PTR_ERR(srq->idx_que.umem);
goto err_srq_mtt;
}