aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-02-04 11:48:16 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-06 14:58:52 -0500
commit62b5942aa5182686e6bab2c6db5dbf2672b8981e (patch)
tree055163d888b75a74b247a437cd26c141834e3456 /net/core
parent4d9e01da87caa9bc63c3284ab38e0dd53eeab6ae (diff)
net: core: Remove unnecessary alloc/OOM messages
alloc failures already get standardized OOM messages and a dump_stack. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c14
-rw-r--r--net/core/netprio_cgroup.c4
2 files changed, 6 insertions, 12 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index a87bc74e9fd0..e04bfdc9e3e4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5958,10 +5958,9 @@ static int netif_alloc_rx_queues(struct net_device *dev)
5958 BUG_ON(count < 1); 5958 BUG_ON(count < 1);
5959 5959
5960 rx = kcalloc(count, sizeof(struct netdev_rx_queue), GFP_KERNEL); 5960 rx = kcalloc(count, sizeof(struct netdev_rx_queue), GFP_KERNEL);
5961 if (!rx) { 5961 if (!rx)
5962 pr_err("netdev: Unable to allocate %u rx queues\n", count);
5963 return -ENOMEM; 5962 return -ENOMEM;
5964 } 5963
5965 dev->_rx = rx; 5964 dev->_rx = rx;
5966 5965
5967 for (i = 0; i < count; i++) 5966 for (i = 0; i < count; i++)
@@ -5992,10 +5991,9 @@ static int netif_alloc_netdev_queues(struct net_device *dev)
5992 BUG_ON(count < 1); 5991 BUG_ON(count < 1);
5993 5992
5994 tx = kcalloc(count, sizeof(struct netdev_queue), GFP_KERNEL); 5993 tx = kcalloc(count, sizeof(struct netdev_queue), GFP_KERNEL);
5995 if (!tx) { 5994 if (!tx)
5996 pr_err("netdev: Unable to allocate %u tx queues\n", count);
5997 return -ENOMEM; 5995 return -ENOMEM;
5998 } 5996
5999 dev->_tx = tx; 5997 dev->_tx = tx;
6000 5998
6001 netdev_for_each_tx_queue(dev, netdev_init_one_queue, NULL); 5999 netdev_for_each_tx_queue(dev, netdev_init_one_queue, NULL);
@@ -6482,10 +6480,8 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
6482 alloc_size += NETDEV_ALIGN - 1; 6480 alloc_size += NETDEV_ALIGN - 1;
6483 6481
6484 p = kzalloc(alloc_size, GFP_KERNEL); 6482 p = kzalloc(alloc_size, GFP_KERNEL);
6485 if (!p) { 6483 if (!p)
6486 pr_err("alloc_netdev: Unable to allocate device\n");
6487 return NULL; 6484 return NULL;
6488 }
6489 6485
6490 dev = PTR_ALIGN(p, NETDEV_ALIGN); 6486 dev = PTR_ALIGN(p, NETDEV_ALIGN);
6491 dev->padded = (char *)dev - (char *)p; 6487 dev->padded = (char *)dev - (char *)p;
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c
index 5e67defe2cb0..0777d0aa18c3 100644
--- a/net/core/netprio_cgroup.c
+++ b/net/core/netprio_cgroup.c
@@ -69,10 +69,8 @@ static int extend_netdev_table(struct net_device *dev, u32 target_idx)
69 69
70 /* allocate & copy */ 70 /* allocate & copy */
71 new = kzalloc(new_sz, GFP_KERNEL); 71 new = kzalloc(new_sz, GFP_KERNEL);
72 if (!new) { 72 if (!new)
73 pr_warn("Unable to alloc new priomap!\n");
74 return -ENOMEM; 73 return -ENOMEM;
75 }
76 74
77 if (old) 75 if (old)
78 memcpy(new->priomap, old->priomap, 76 memcpy(new->priomap, old->priomap,