aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r--drivers/net/forcedeth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 136827f8dc2e..6d1d50a19783 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5137,12 +5137,10 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5137 goto out_unmap; 5137 goto out_unmap;
5138 np->tx_ring.ex = &np->rx_ring.ex[np->rx_ring_size]; 5138 np->tx_ring.ex = &np->rx_ring.ex[np->rx_ring_size];
5139 } 5139 }
5140 np->rx_skb = kmalloc(sizeof(struct nv_skb_map) * np->rx_ring_size, GFP_KERNEL); 5140 np->rx_skb = kcalloc(np->rx_ring_size, sizeof(struct nv_skb_map), GFP_KERNEL);
5141 np->tx_skb = kmalloc(sizeof(struct nv_skb_map) * np->tx_ring_size, GFP_KERNEL); 5141 np->tx_skb = kcalloc(np->tx_ring_size, sizeof(struct nv_skb_map), GFP_KERNEL);
5142 if (!np->rx_skb || !np->tx_skb) 5142 if (!np->rx_skb || !np->tx_skb)
5143 goto out_freering; 5143 goto out_freering;
5144 memset(np->rx_skb, 0, sizeof(struct nv_skb_map) * np->rx_ring_size);
5145 memset(np->tx_skb, 0, sizeof(struct nv_skb_map) * np->tx_ring_size);
5146 5144
5147 dev->open = nv_open; 5145 dev->open = nv_open;
5148 dev->stop = nv_close; 5146 dev->stop = nv_close;