netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com
Subject: [patch net-next] team: init error value to 0 in team_netpoll_setup()
Date: Tue, 24 Jul 2012 13:20:48 +0200	[thread overview]
Message-ID: <1343128848-1284-1-git-send-email-jiri@resnulli.us> (raw)

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

             reply	other threads:[~2012-07-24 11:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24 11:20 Jiri Pirko [this message]
2012-07-24 11:39 ` [patch net-next] team: init error value to 0 in team_netpoll_setup() Eric Dumazet
2012-07-24 20:56 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343128848-1284-1-git-send-email-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).