Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88041b79 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jeff Garzik
Browse files

[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: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 5ac36615
Loading
Loading
Loading
Loading
+0 −9
Original line number Original line Diff line number Diff line
@@ -3035,15 +3035,6 @@ int register_netdev(struct net_device *dev)
			goto out;
			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);
	err = register_netdevice(dev);
out:
out:
	rtnl_unlock();
	rtnl_unlock();