diff options
author | Joe Perches <joe@perches.com> | 2014-08-08 17:24:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:29 -0400 |
commit | 12fe08b2b5acada5ce708866786d08918e1f4819 (patch) | |
tree | 3084f158bcf551e3116af538a864cbd13a6387f7 | |
parent | 87f44b4e282a419fe82e9625ea6d3f35f614381f (diff) |
sky2: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Mirko Lindner <mlindner@marvell.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/net/ethernet/marvell/sky2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 69693384b58c..59915144aabb 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -1622,11 +1622,10 @@ static int sky2_alloc_buffers(struct sky2_port *sky2) | |||
1622 | if (!sky2->tx_ring) | 1622 | if (!sky2->tx_ring) |
1623 | goto nomem; | 1623 | goto nomem; |
1624 | 1624 | ||
1625 | sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES, | 1625 | sky2->rx_le = pci_zalloc_consistent(hw->pdev, RX_LE_BYTES, |
1626 | &sky2->rx_le_map); | 1626 | &sky2->rx_le_map); |
1627 | if (!sky2->rx_le) | 1627 | if (!sky2->rx_le) |
1628 | goto nomem; | 1628 | goto nomem; |
1629 | memset(sky2->rx_le, 0, RX_LE_BYTES); | ||
1630 | 1629 | ||
1631 | sky2->rx_ring = kcalloc(sky2->rx_pending, sizeof(struct rx_ring_info), | 1630 | sky2->rx_ring = kcalloc(sky2->rx_pending, sizeof(struct rx_ring_info), |
1632 | GFP_KERNEL); | 1631 | GFP_KERNEL); |