Subject: [PATCH] net: use kcalloc in netdev_queue alloc

From: Stephen Hemminger <[email-masked]>
Date: Mon, 21 Jul 2008 11:19:33 -0700

Minor nit, use size_t for allocation size and kcalloc to allocate
an array. Probably makes no actual code difference.

Signed-off-by: Stephen Hemminger <[email-masked]>

--- a/net/core/dev.c	2008-07-21 11:13:29.000000000 -0700
+++ b/net/core/dev.c	2008-07-21 11:15:12.000000000 -0700
@@ -4198,7 +4198,7 @@ struct net_device *alloc_netdev_mq(int s
 {
 	struct netdev_queue *tx;
 	struct net_device *dev;
-	int alloc_size;
+	size_t alloc_size;
 	void *p;
 
 	BUG_ON(strlen(name) >= sizeof(dev->name));
@@ -4218,7 +4218,7 @@ struct net_device *alloc_netdev_mq(int s
 		return NULL;
 	}
 
-	tx = kzalloc(sizeof(struct netdev_queue) * queue_count, GFP_KERNEL);
+	tx = kcalloc(queue_count, sizeof(struct netdev_queue), GFP_KERNEL);
 	if (!tx) {
 		printk(KERN_ERR "alloc_netdev: Unable to allocate "
 		       "tx qdiscs.\n");