Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336193
b: refs/heads/master
c: 892a925
h: refs/heads/master
i:
  336191: 9c92247
v: v3
  • Loading branch information
françois romieu authored and David S. Miller committed Dec 2, 2012
1 parent f21548a commit ff51369
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: 64022d0b4e93ea432e95db55a72b8a1c5775f3c0
refs/heads/master: 892a925e42adb8192a3c832ad29cbc780fc466f6
11 changes: 8 additions & 3 deletions trunk/drivers/net/ethernet/realtek/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,17 +1060,22 @@ static int cp_init_rings (struct cp_private *cp)

static int cp_alloc_rings (struct cp_private *cp)
{
struct device *d = &cp->pdev->dev;
void *mem;
int rc;

mem = dma_alloc_coherent(&cp->pdev->dev, CP_RING_BYTES,
&cp->ring_dma, GFP_KERNEL);
mem = dma_alloc_coherent(d, CP_RING_BYTES, &cp->ring_dma, GFP_KERNEL);
if (!mem)
return -ENOMEM;

cp->rx_ring = mem;
cp->tx_ring = &cp->rx_ring[CP_RX_RING_SIZE];

return cp_init_rings(cp);
rc = cp_init_rings(cp);
if (rc < 0)
dma_free_coherent(d, CP_RING_BYTES, cp->rx_ring, cp->ring_dma);

return rc;
}

static void cp_clean_rings (struct cp_private *cp)
Expand Down

0 comments on commit ff51369

Please sign in to comment.