diff options
| author | Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> | 2012-10-12 17:10:11 -0400 |
|---|---|---|
| committer | Roland Dreier <roland@purestorage.com> | 2012-10-22 14:05:00 -0400 |
| commit | 32c631f9f2566d09d32abc2f4c7aa24c6d8b5641 (patch) | |
| tree | f52a29e97fda3e60e84755939102601e5c646692 /drivers/infiniband/hw/cxgb4 | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
RDMA/cxgb4: Don't free chunk that we have failed to allocate
In the error path of registering memory when there's a failure to
allocate a chunk from the memory pool, we try to free the same chunk
we just failed to allocate, which will BUG().
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c index 57e07c61ace..afd81790ab3 100644 --- a/drivers/infiniband/hw/cxgb4/mem.c +++ b/drivers/infiniband/hw/cxgb4/mem.c | |||
| @@ -468,7 +468,7 @@ struct ib_mr *c4iw_register_phys_mem(struct ib_pd *pd, | |||
| 468 | ret = alloc_pbl(mhp, npages); | 468 | ret = alloc_pbl(mhp, npages); |
| 469 | if (ret) { | 469 | if (ret) { |
| 470 | kfree(page_list); | 470 | kfree(page_list); |
| 471 | goto err_pbl; | 471 | goto err; |
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | ret = write_pbl(&mhp->rhp->rdev, page_list, mhp->attr.pbl_addr, | 474 | ret = write_pbl(&mhp->rhp->rdev, page_list, mhp->attr.pbl_addr, |
