netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next] team: init error value to 0 in team_netpoll_setup()
@ 2012-07-24 11:20 Jiri Pirko
  2012-07-24 11:39 ` Eric Dumazet
  2012-07-24 20:56 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Pirko @ 2012-07-24 11:20 UTC (permalink / raw)
  To: netdev; +Cc: davem, edumazet

This will ensure correct value is returned in case the port list is empty.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/team/team.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch net-next] team: init error value to 0 in team_netpoll_setup()
  2012-07-24 11:20 [patch net-next] team: init error value to 0 in team_netpoll_setup() Jiri Pirko
@ 2012-07-24 11:39 ` Eric Dumazet
  2012-07-24 20:56 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2012-07-24 11:39 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, davem, edumazet

On Tue, 2012-07-24 at 13:20 +0200, Jiri Pirko wrote:
> This will ensure correct value is returned in case the port list is empty.
> 
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
>  drivers/net/team/team.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reported-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch net-next] team: init error value to 0 in team_netpoll_setup()
  2012-07-24 11:20 [patch net-next] team: init error value to 0 in team_netpoll_setup() Jiri Pirko
  2012-07-24 11:39 ` Eric Dumazet
@ 2012-07-24 20:56 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2012-07-24 20:56 UTC (permalink / raw)
  To: jiri; +Cc: netdev, edumazet

From: Jiri Pirko <jiri@resnulli.us>
Date: Tue, 24 Jul 2012 13:20:48 +0200

> This will ensure correct value is returned in case the port list is empty.
> 
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-24 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-24 11:20 [patch net-next] team: init error value to 0 in team_netpoll_setup() Jiri Pirko
2012-07-24 11:39 ` Eric Dumazet
2012-07-24 20:56 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).