summaryrefslogtreecommitdiffstats
path: root/drivers/net/team
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2012-07-24 03:20:48 +0200
committerDavid S. Miller <davem@davemloft.net>2012-07-24 22:54:15 +0200
commit3324d024ba4bebb74a78d84b925b59df73a92fbd (patch)
treef581c110d2698f4a15396b5ad50c25436f412966 /drivers/net/team
parenttcp: early_demux fixes (diff)
downloadlinux-3324d024ba4bebb74a78d84b925b59df73a92fbd.tar.xz
linux-3324d024ba4bebb74a78d84b925b59df73a92fbd.zip
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>
Diffstat (limited to 'drivers/net/team')
-rw-r--r--drivers/net/team/team.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index b104c05225f7..87707ab39430 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -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) {