diff options
author | Julia Lawall <julia@diku.dk> | 2011-10-06 12:33:24 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-10-06 12:33:24 -0400 |
commit | e2e435f290795e409a649423f19574ba77942854 (patch) | |
tree | 826759466f4998627fcf4edc123de0b47f6daed3 /drivers | |
parent | 976d167615b64e14bc1491ca51d424e2ba9a5e84 (diff) |
RDMA/nes: Add missing calls to ib_umem_release()
Add calls to ib_umem_release(), as in the other error-handling code in
nes_reg_user_mr().
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 9f2f7d4b1197..394d0e7e4a5c 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -2338,8 +2338,10 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, | |||
2338 | 2338 | ||
2339 | skip_pages = ((u32)region->offset) >> 12; | 2339 | skip_pages = ((u32)region->offset) >> 12; |
2340 | 2340 | ||
2341 | if (ib_copy_from_udata(&req, udata, sizeof(req))) | 2341 | if (ib_copy_from_udata(&req, udata, sizeof(req))) { |
2342 | ib_umem_release(region); | ||
2342 | return ERR_PTR(-EFAULT); | 2343 | return ERR_PTR(-EFAULT); |
2344 | } | ||
2343 | nes_debug(NES_DBG_MR, "Memory Registration type = %08X.\n", req.reg_type); | 2345 | nes_debug(NES_DBG_MR, "Memory Registration type = %08X.\n", req.reg_type); |
2344 | 2346 | ||
2345 | switch (req.reg_type) { | 2347 | switch (req.reg_type) { |
@@ -2631,6 +2633,7 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, | |||
2631 | return &nesmr->ibmr; | 2633 | return &nesmr->ibmr; |
2632 | } | 2634 | } |
2633 | 2635 | ||
2636 | ib_umem_release(region); | ||
2634 | return ERR_PTR(-ENOSYS); | 2637 | return ERR_PTR(-ENOSYS); |
2635 | } | 2638 | } |
2636 | 2639 | ||