Skip to contentSkip to conversation

remove dev_get from wanrouter

PATCH Applied Stephen Hemminger 2 participants 2 messages Sep 29, 2003 – Oct 14, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove dev_get from wanrouter

The call to dev_get() in wanrouter_device_new_if is racy and redundant and should be removed. The later 'register_netdev()' does the same test internally and will return the appropriate error if the name already exists.

This patch is against 2.6.0-test6.
Resend of earlier patch because it was ignored, or missed.

net/wanrouter/wanmain.c +0 -2
diff -urN -X dontdiff linux-2.5/net/wanrouter/wanmain.c linux-2.5-net/net/wanrouter/wanmain.c
@@ -726,8 +726,6 @@
 
 		if (dev->name == NULL) {
 			err = -EINVAL;
-		} else if (dev_get(dev->name)) {
-			err = -EEXIST;	/* name already exists */
 		} else {
 
 			#ifdef WANDEBUG