diff options
-rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index cbc34c0db376..1698b3998981 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -4207,7 +4207,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | |||
4207 | { | 4207 | { |
4208 | struct netdev_queue *tx; | 4208 | struct netdev_queue *tx; |
4209 | struct net_device *dev; | 4209 | struct net_device *dev; |
4210 | int alloc_size; | 4210 | size_t alloc_size; |
4211 | void *p; | 4211 | void *p; |
4212 | 4212 | ||
4213 | BUG_ON(strlen(name) >= sizeof(dev->name)); | 4213 | BUG_ON(strlen(name) >= sizeof(dev->name)); |
@@ -4227,7 +4227,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | |||
4227 | return NULL; | 4227 | return NULL; |
4228 | } | 4228 | } |
4229 | 4229 | ||
4230 | tx = kzalloc(sizeof(struct netdev_queue) * queue_count, GFP_KERNEL); | 4230 | tx = kcalloc(queue_count, sizeof(struct netdev_queue), GFP_KERNEL); |
4231 | if (!tx) { | 4231 | if (!tx) { |
4232 | printk(KERN_ERR "alloc_netdev: Unable to allocate " | 4232 | printk(KERN_ERR "alloc_netdev: Unable to allocate " |
4233 | "tx qdiscs.\n"); | 4233 | "tx qdiscs.\n"); |