summaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2010-03-30 13:54:21 +0200
committerDavid S. Miller <davem@davemloft.net>2010-03-31 08:03:17 +0200
commited130589d9afa3238c94b9537f2024355b9638e1 (patch)
tree3e006eaf42adbc7257772598a7446583209be4da /drivers/net/gianfar.c
parentgianfar: Fix a memory leak in gianfar close code (diff)
downloadlinux-ed130589d9afa3238c94b9537f2024355b9638e1.tar.xz
linux-ed130589d9afa3238c94b9537f2024355b9638e1.zip
net: gianfar - initialize per-queue statistics
Interfaces come up claiming having already received 3.0 GiB. Use kzalloc to properly initialize per-queue data. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index c98fead8412b..8ea78353d1e2 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -676,7 +676,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
priv->rx_queue[i] = NULL;
for (i = 0; i < priv->num_tx_queues; i++) {
- priv->tx_queue[i] = (struct gfar_priv_tx_q *)kmalloc(
+ priv->tx_queue[i] = (struct gfar_priv_tx_q *)kzalloc(
sizeof (struct gfar_priv_tx_q), GFP_KERNEL);
if (!priv->tx_queue[i]) {
err = -ENOMEM;
@@ -689,7 +689,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
}
for (i = 0; i < priv->num_rx_queues; i++) {
- priv->rx_queue[i] = (struct gfar_priv_rx_q *)kmalloc(
+ priv->rx_queue[i] = (struct gfar_priv_rx_q *)kzalloc(
sizeof (struct gfar_priv_rx_q), GFP_KERNEL);
if (!priv->rx_queue[i]) {
err = -ENOMEM;