summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-12-17 08:08:15 +0100
committerJason Gunthorpe <jgg@mellanox.com>2018-12-18 22:21:45 +0100
commite9dfa53a399545056cf97cf8c996d71dcebb4d7e (patch)
tree8ad91eb31d652b5e9ec579bdd441b215db32ed06 /drivers/infiniband/hw/hns
parentIB/qib: Fix an error code in qib_sdma_verbs_send() (diff)
downloadlinux-e9dfa53a399545056cf97cf8c996d71dcebb4d7e.tar.xz
linux-e9dfa53a399545056cf97cf8c996d71dcebb4d7e.zip
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')
-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;
}