]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sky2: use pci_zalloc_consistent
authorJoe Perches <joe@perches.com>
Thu, 26 Jun 2014 00:43:18 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 27 Jun 2014 04:21:49 +0000 (14:21 +1000)
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>
drivers/net/ethernet/marvell/sky2.c

index 69693384b58ccfefd2bd9918112b8b08431f0368..59915144aabb18d4d70334406214255bb9439975 100644 (file)
@@ -1622,11 +1622,10 @@ static int sky2_alloc_buffers(struct sky2_port *sky2)
        if (!sky2->tx_ring)
                goto nomem;
 
-       sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES,
-                                          &sky2->rx_le_map);
+       sky2->rx_le = pci_zalloc_consistent(hw->pdev, RX_LE_BYTES,
+                                           &sky2->rx_le_map);
        if (!sky2->rx_le)
                goto nomem;
-       memset(sky2->rx_le, 0, RX_LE_BYTES);
 
        sky2->rx_ring = kcalloc(sky2->rx_pending, sizeof(struct rx_ring_info),
                                GFP_KERNEL);