projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3958cc5
)
RDMA/hns: Add releasing resource operation in error branch
author
Wei Hu(Xavier)
<xavier.huwei@huawei.com>
Wed, 30 Aug 2017 09:23:16 +0000
(17:23 +0800)
committer
Doug Ledford
<dledford@redhat.com>
Wed, 27 Sep 2017 12:34:56 +0000
(08:34 -0400)
This patch adds releasing resource operation in error branch
of the function named hns_roce_table_get.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_hem.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/hns/hns_roce_hem.c
b/drivers/infiniband/hw/hns/hns_roce_hem.c
index
8a3e174
..
125e26e
100644
(file)
--- a/
drivers/infiniband/hw/hns/hns_roce_hem.c
+++ b/
drivers/infiniband/hw/hns/hns_roce_hem.c
@@
-563,6
+563,8
@@
int hns_roce_table_get(struct hns_roce_dev *hr_dev,
/* Set HEM base address(128K/page, pa) to Hardware */
if (hns_roce_set_hem(hr_dev, table, obj)) {
+ hns_roce_free_hem(hr_dev, table->hem[i]);
+ table->hem[i] = NULL;
ret = -ENODEV;
dev_err(dev, "set HEM base address to HW failed.\n");
goto out;