netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: gianfar - initialize per-queue statistics
@ 2010-03-30 21:54 Kim Phillips
  2010-03-30 21:54 ` [PATCH 2/2] net: gianfar - align BD ring size console messages Kim Phillips
  2010-03-31  6:09 ` [PATCH 1/2] net: gianfar - initialize per-queue statistics David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Kim Phillips @ 2010-03-30 21:54 UTC (permalink / raw)
  To: David S. Miller, Anton Vorontsov, Sandeep Gopalpet, Kumar Gala,
	Andy 
  Cc: Kim Phillips

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>
---
 drivers/net/gianfar.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 669de02..d557ab6 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;
-- 
1.7.0.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-31  6:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 21:54 [PATCH 1/2] net: gianfar - initialize per-queue statistics Kim Phillips
2010-03-30 21:54 ` [PATCH 2/2] net: gianfar - align BD ring size console messages Kim Phillips
2010-03-31  6:09   ` David Miller
2010-03-31  6:09 ` [PATCH 1/2] net: gianfar - initialize per-queue statistics David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).