summaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-04-30 01:21:32 +0000
committerDavid S. Miller <davem@davemloft.net>2011-05-05 10:57:45 -0700
commit1c5cae815d19ffe02bdfda1260949ef2b1806171 (patch)
treed47a73c05afacd21985abb8df9862136385c58f0 /drivers/net/tun.c
parente8920674979705392abc4db4ebbe78feb68a4da1 (diff)
downloadblackbird-op-linux-1c5cae815d19ffe02bdfda1260949ef2b1806171.tar.gz
blackbird-op-linux-1c5cae815d19ffe02bdfda1260949ef2b1806171.zip
net: call dev_alloc_name from register_netdevice
Force dev_alloc_name() to be called from register_netdevice() by dev_get_valid_name(). That allows to remove multiple explicit dev_alloc_name() calls. The possibility to call dev_alloc_name in advance remains. This also fixes veth creation regresion caused by 84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743 Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 0636f7040325..74e94054ab1a 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1099,12 +1099,6 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
tun_net_init(dev);
- if (strchr(dev->name, '%')) {
- err = dev_alloc_name(dev, dev->name);
- if (err < 0)
- goto err_free_sk;
- }
-
dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST |
TUN_USER_FEATURES;
dev->features = dev->hw_features;
OpenPOWER on IntegriCloud