Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63224
b: refs/heads/master
c: 0172e2e
h: refs/heads/master
v: v3
  • Loading branch information
Jack Morgenstein authored and Roland Dreier committed Jul 28, 2007
1 parent 8720317 commit 0acbdf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e8e6ee380c3858151165d7455b4954782f145a0
refs/heads/master: 0172e2e14c3c1df10ec0fa31d9f41c1bc3a472f3
15 changes: 3 additions & 12 deletions trunk/drivers/net/mlx4/mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 0acbdf5

Please sign in to comment.