Skip to content

Commit

Permalink
[PATCH] netdev: don't allow register_netdev with blank name
Browse files Browse the repository at this point in the history
This bit of old backwards compatibility cruft can be removed in 2.6.20.
If there is still an device that calls register_netdev()
with a zero or blank name, it will get -EINVAL from register_netdevice().

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Dec 2, 2006
1 parent 5ac3661 commit 88041b7
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3035,15 +3035,6 @@ int register_netdev(struct net_device *dev)
goto out;
}

/*
* Back compatibility hook. Kill this one in 2.5
*/
if (dev->name[0] == 0 || dev->name[0] == ' ') {
err = dev_alloc_name(dev, "eth%d");
if (err < 0)
goto out;
}

err = register_netdevice(dev);
out:
rtnl_unlock();
Expand Down

0 comments on commit 88041b7

Please sign in to comment.