summaryrefslogtreecommitdiffstats
path: root/drivers/net/veth.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-01-24 06:45:46 +0100
committerDavid S. Miller <davem@davemloft.net>2011-01-25 08:18:18 +0100
commit84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743 (patch)
tree92ae1276bf9e2a6be451f7e7bf4cc73486b0df42 /drivers/net/veth.c
parentnet: reduce and unify printk level in netdev_fix_features() (diff)
downloadlinux-84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743.tar.xz
linux-84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743.zip
veth: remove unneeded ifname code from veth_newlink()
The code is not needed because tb[IFLA_IFNAME] is already processed in rtnl_newlink(). Remove this redundancy. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r--drivers/net/veth.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index cc83fa71c3ff..105d7f0630cc 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -403,17 +403,6 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
if (tb[IFLA_ADDRESS] == NULL)
random_ether_addr(dev->dev_addr);
- if (tb[IFLA_IFNAME])
- nla_strlcpy(dev->name, tb[IFLA_IFNAME], IFNAMSIZ);
- else
- snprintf(dev->name, IFNAMSIZ, DRV_NAME "%%d");
-
- if (strchr(dev->name, '%')) {
- err = dev_alloc_name(dev, dev->name);
- if (err < 0)
- goto err_alloc_name;
- }
-
err = register_netdevice(dev);
if (err < 0)
goto err_register_dev;
@@ -433,7 +422,6 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
err_register_dev:
/* nothing to do */
-err_alloc_name:
err_configure_peer:
unregister_netdevice(peer);
return err;