Skip to content

Commit

Permalink
team: init error value to 0 in team_netpoll_setup()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jul 24, 2012
1 parent 9cb429d commit 3324d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ static int team_netpoll_setup(struct net_device *dev,
{
struct team *team = netdev_priv(dev);
struct team_port *port;
int err;
int err = 0;

mutex_lock(&team->lock);
list_for_each_entry(port, &team->port_list, list) {
Expand Down

0 comments on commit 3324d02

Please sign in to comment.