[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1343118639.2626.11042.camel@edumazet-glaptop>
Date: Tue, 24 Jul 2012 10:30:39 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [patch net-next 2/2] team: add netpoll support
On Tue, 2012-07-17 at 17:22 +0200, Jiri Pirko wrote:
> It's done in very similar way this is done in bonding and bridge.
>
> Signed-off-by: Jiri Pirko <jiri@...nulli.us>
> ---
> +static int team_netpoll_setup(struct net_device *dev,
> + struct netpoll_info *npifo)
> +{
> + struct team *team = netdev_priv(dev);
> + struct team_port *port;
> + int err;
> +
> + mutex_lock(&team->lock);
> + list_for_each_entry(port, &team->port_list, list) {
> + err = team_port_enable_netpoll(team, port);
> + if (err) {
> + __team_netpoll_cleanup(team);
> + break;
> + }
> + }
> + mutex_unlock(&team->lock);
> + return err;
> +}
If port_list is empty, we return a non initialized value in 'err'
What would be the fix ? 0 or an error ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists