[PATCH] netdev: don't allow register_netdev with blank name
authorStephen Hemminger <shemminger@osdl.org>
Fri, 17 Nov 2006 21:41:58 +0000 (13:41 -0800)
committerJeff Garzik <jeff@garzik.org>
Sat, 2 Dec 2006 05:16:37 +0000 (00:16 -0500)
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>
net/core/dev.c

index 81c426adcd1ec66b760f1447d6cd9dfe4402e574..411c2428d2682109c5343701fbf60c4c34ae03c5 100644 (file)
@@ -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();