diff options
author | Hong zhi guo <honkiko@gmail.com> | 2013-06-09 20:15:20 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-12 01:21:20 -0700 |
commit | 3f8b96379a820318db37f7b6e81e6e459ad56efe (patch) | |
tree | 472e52b4ed549ae9cdeaee26ec5f9067af4fdefd | |
parent | 7a6e288d2745611bef5b614acf19644283765732 (diff) |
veth: remove redundant call of dev_alloc_name
it's called in the following register_netdevice. No need to call it
here.
Tested with "ip link add type veth" and "ip link add xxx%d type veth".
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/veth.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 177f911f5946..da866523cf20 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -379,12 +379,6 @@ static int veth_newlink(struct net *src_net, struct net_device *dev, 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; @@ -404,7 +398,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; |