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-Url: https://git.stricted.de/?a=commitdiff_plain;h=3324d024ba4bebb74a78d84b925b59df73a92fbd;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 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) {