summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-02-08 17:19:01 -0800
committerDavid S. Miller <davem@davemloft.net>2011-02-08 17:19:01 -0800
commit263fb5b1bf9265d0e4ce59ff6ea92f478b5b61ea (patch)
tree5ee497d530185d32421122729af86cf77d0dc649 /net/core
parent8d13a2a9fb3e5e3f68e9d3ec0de3c8fcfa56a224 (diff)
parentc69b90920a36b88ab0d649963d81355d865eeb05 (diff)
downloadblackbird-op-linux-263fb5b1bf9265d0e4ce59ff6ea92f478b5b61ea.tar.gz
blackbird-op-linux-263fb5b1bf9265d0e4ce59ff6ea92f478b5b61ea.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/e1000e/netdev.c
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index f46ee357ff2e..6392ea0a5910 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5807,31 +5807,36 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
dev_net_set(dev, &init_net);
+ dev->gso_max_size = GSO_MAX_SIZE;
+
+ INIT_LIST_HEAD(&dev->ethtool_ntuple_list.list);
+ dev->ethtool_ntuple_list.count = 0;
+ INIT_LIST_HEAD(&dev->napi_list);
+ INIT_LIST_HEAD(&dev->unreg_list);
+ INIT_LIST_HEAD(&dev->link_watch_list);
+ dev->priv_flags = IFF_XMIT_DST_RELEASE;
+ setup(dev);
+
dev->num_tx_queues = txqs;
dev->real_num_tx_queues = txqs;
if (netif_alloc_netdev_queues(dev))
- goto free_pcpu;
+ goto free_all;
#ifdef CONFIG_RPS
dev->num_rx_queues = rxqs;
dev->real_num_rx_queues = rxqs;
if (netif_alloc_rx_queues(dev))
- goto free_pcpu;
+ goto free_all;
#endif
- dev->gso_max_size = GSO_MAX_SIZE;
-
- INIT_LIST_HEAD(&dev->ethtool_ntuple_list.list);
- dev->ethtool_ntuple_list.count = 0;
- INIT_LIST_HEAD(&dev->napi_list);
- INIT_LIST_HEAD(&dev->unreg_list);
- INIT_LIST_HEAD(&dev->link_watch_list);
- dev->priv_flags = IFF_XMIT_DST_RELEASE;
- setup(dev);
strcpy(dev->name, name);
dev->group = INIT_NETDEV_GROUP;
return dev;
+free_all:
+ free_netdev(dev);
+ return NULL;
+
free_pcpu:
free_percpu(dev->pcpu_refcnt);
kfree(dev->_tx);
OpenPOWER on IntegriCloud