netdev: don't allow register_netdev with blank name
Subsystems (2)
PATCH 1/1 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 <[email protected]>
net/core/dev.c +0 -9
@@ -3035,15 +3035,6 @@ 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 ();
From: Stephen Hemminger <[email protected]>
Date: Fri, 17 Nov 2006 13:41:58 -0800
Quoted 5 lines
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-EINVALfromregister_netdevice().Signed-off-by Stephen Hemminger <[email protected]>
Applied, thanks Stephen.