Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223763
b: refs/heads/master
c: f7e4c97
h: refs/heads/master
i:
  223761: 65ef169
  223759: 6a6b251
v: v3
  • Loading branch information
Jesper Juhl authored and David S. Miller committed Dec 31, 2010
1 parent 5a65d15 commit 9df11bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 2393c944d5d60eedaede80273ede8a816b5fa3e0
refs/heads/master: f7e4c9775ea648deed4a8193951e50d0c7706173
10 changes: 8 additions & 2 deletions trunk/drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,15 +940,15 @@ static int cnic_alloc_uio_rings(struct cnic_dev *dev, int pages)
&udev->l2_ring_map,
GFP_KERNEL | __GFP_COMP);
if (!udev->l2_ring)
return -ENOMEM;
goto err_udev;

udev->l2_buf_size = (cp->l2_rx_ring_size + 1) * cp->l2_single_buf_size;
udev->l2_buf_size = PAGE_ALIGN(udev->l2_buf_size);
udev->l2_buf = dma_alloc_coherent(&udev->pdev->dev, udev->l2_buf_size,
&udev->l2_buf_map,
GFP_KERNEL | __GFP_COMP);
if (!udev->l2_buf)
return -ENOMEM;
goto err_dma;

write_lock(&cnic_dev_lock);
list_add(&udev->list, &cnic_udev_list);
Expand All @@ -959,6 +959,12 @@ static int cnic_alloc_uio_rings(struct cnic_dev *dev, int pages)
cp->udev = udev;

return 0;
err_dma:
dma_free_coherent(&udev->pdev->dev, udev->l2_ring_size,
udev->l2_ring, udev->l2_ring_map);
err_udev:
kfree(udev);
return -ENOMEM;
}

static int cnic_init_uio(struct cnic_dev *dev)
Expand Down

0 comments on commit 9df11bc

Please sign in to comment.