Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229255
b: refs/heads/master
c: 030b4b3
h: refs/heads/master
i:
  229253: 8c5f002
  229251: 540516d
  229247: 2f5525b
v: v3
  • Loading branch information
Ali Ayoub authored and Roland Dreier committed Jan 11, 2011
1 parent 40459f2 commit 58f8b76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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: 3afa9f19e5bd16abed998b7bf1b178206403286f
refs/heads/master: 030b4b3309e29c6c857d8521c3076743663c259e
3 changes: 2 additions & 1 deletion trunk/drivers/net/mlx4/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
} else {
int i;

buf->direct.buf = NULL;
buf->nbufs = (size + PAGE_SIZE - 1) / PAGE_SIZE;
buf->npages = buf->nbufs;
buf->page_shift = PAGE_SHIFT;
Expand Down Expand Up @@ -229,7 +230,7 @@ void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf)
dma_free_coherent(&dev->pdev->dev, size, buf->direct.buf,
buf->direct.map);
else {
if (BITS_PER_LONG == 64)
if (BITS_PER_LONG == 64 && buf->direct.buf)
vunmap(buf->direct.buf);

for (i = 0; i < buf->nbufs; ++i)
Expand Down

0 comments on commit 58f8b76

Please sign in to comment.