mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
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>
This commit is contained in:
parent
87f44b4e28
commit
12fe08b2b5
1 changed files with 2 additions and 3 deletions
|
@ -1622,11 +1622,10 @@ static int sky2_alloc_buffers(struct sky2_port *sky2)
|
||||||
if (!sky2->tx_ring)
|
if (!sky2->tx_ring)
|
||||||
goto nomem;
|
goto nomem;
|
||||||
|
|
||||||
sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES,
|
sky2->rx_le = pci_zalloc_consistent(hw->pdev, RX_LE_BYTES,
|
||||||
&sky2->rx_le_map);
|
&sky2->rx_le_map);
|
||||||
if (!sky2->rx_le)
|
if (!sky2->rx_le)
|
||||||
goto nomem;
|
goto nomem;
|
||||||
memset(sky2->rx_le, 0, RX_LE_BYTES);
|
|
||||||
|
|
||||||
sky2->rx_ring = kcalloc(sky2->rx_pending, sizeof(struct rx_ring_info),
|
sky2->rx_ring = kcalloc(sky2->rx_pending, sizeof(struct rx_ring_info),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
Loading…
Reference in a new issue