From: Jiri Pirko Date: Tue, 24 Jul 2012 01:20:48 +0000 (+0000) Subject: team: init error value to 0 in team_netpoll_setup() X-Git-Tag: v3.6-rc1~78^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3324d024ba4bebb74a78d84b925b59df73a92fbd;p=platform%2Fkernel%2Flinux-3.10.git 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 Reported-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index b104c05..87707ab 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) {