team: init error value to 0 in team_netpoll_setup()
This will ensure correct value is returned in case the port list is empty. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Reported-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
					parent
					
						
							
								9cb429d692
							
						
					
				
			
			
				commit
				
					
						3324d024ba
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -1447,7 +1447,7 @@ static int team_netpoll_setup(struct net_device *dev,
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct team *team = netdev_priv(dev);
 | 
						struct team *team = netdev_priv(dev);
 | 
				
			||||||
	struct team_port *port;
 | 
						struct team_port *port;
 | 
				
			||||||
	int err;
 | 
						int err = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mutex_lock(&team->lock);
 | 
						mutex_lock(&team->lock);
 | 
				
			||||||
	list_for_each_entry(port, &team->port_list, list) {
 | 
						list_for_each_entry(port, &team->port_list, list) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue