diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-30 16:36:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-30 16:36:33 -0700 |
commit | 4dcf39c6cc5f9f01c46aa71fe95cae9927edeeab (patch) | |
tree | 84de77738748fdfa54778833b440f7bf009639eb /drivers/net | |
parent | af9473118979f3b09ee5d92fdbd8014cf085f7c5 (diff) | |
parent | 78d1e02fac0595a8aa8a5064d1bd0c0ea55b22b0 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/ipath: Workaround problem of errormask register being overwritten
IB/ipath: Fix some issues with buffer cancel and sendctrl register update
IB/ipath: Use faster put_tid_2 routine after initialization
IB/ipath: Remove unsafe fastrcvint code from interrupt handler
IB/ehca: Move extern declarations from .c files to .h files
IB/mlx4: Whitespace fix
IB/ehca: Fix include order to better match kernel style
mlx4_core: Remove kfree() in mlx4_mr_alloc() error flow
RDMA/amso1100: Initialize the wait_queue_head_t in the c2_qp structure
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/mlx4/mr.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c index d0808fa3ec8..5b87183e62c 100644 --- a/drivers/net/mlx4/mr.c +++ b/drivers/net/mlx4/mr.c @@ -255,10 +255,8 @@ int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, int err; index = mlx4_bitmap_alloc(&priv->mr_table.mpt_bitmap); - if (index == -1) { - err = -ENOMEM; - goto err; - } + if (index == -1) + return -ENOMEM; mr->iova = iova; mr->size = size; @@ -269,15 +267,8 @@ int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, err = mlx4_mtt_init(dev, npages, page_shift, &mr->mtt); if (err) - goto err_index; - - return 0; - -err_index: - mlx4_bitmap_free(&priv->mr_table.mpt_bitmap, index); + mlx4_bitmap_free(&priv->mr_table.mpt_bitmap, index); -err: - kfree(mr); return err; } EXPORT_SYMBOL_GPL(mlx4_mr_alloc); |