mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	l2tp: remove useless device duplication test in l2tp_eth_create()
There's no need to verify that cfg->ifname is unique at this point. register_netdev() will return -EEXIST if asked to create a device with a name that's alrealy in use. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									0575c86b5d
								
							
						
					
					
						commit
						1514dc857f
					
				
					 1 changed files with 0 additions and 6 deletions
				
			
		|  | @ -280,12 +280,6 @@ static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 p | |||
| 	} | ||||
| 
 | ||||
| 	if (cfg->ifname) { | ||||
| 		dev = dev_get_by_name(net, cfg->ifname); | ||||
| 		if (dev) { | ||||
| 			dev_put(dev); | ||||
| 			rc = -EEXIST; | ||||
| 			goto out; | ||||
| 		} | ||||
| 		strlcpy(name, cfg->ifname, IFNAMSIZ); | ||||
| 		name_assign_type = NET_NAME_USER; | ||||
| 	} else { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Guillaume Nault
						Guillaume Nault