From: Stephen Hemminger Date: Fri, 17 Nov 2006 21:41:58 +0000 (-0800) Subject: [PATCH] netdev: don't allow register_netdev with blank name X-Git-Tag: MMI-PSA29.97-13-9~44978^2~47^2~564^2~22 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=88041b79f864dcd7f95e1d594eba683244dd968a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] netdev: don't allow register_netdev with blank name 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 Signed-off-by: Jeff Garzik --- diff --git a/net/core/dev.c b/net/core/dev.c index 81c426adcd1e..411c2428d268 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -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();