diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 177f911f59462f6770df07ff11b49b12f998dfce..da866523cf20097d57550c7357020e937782fd37 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;