netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next] team: do not use -ENOENT
@ 2013-01-17 10:25 Jiri Pirko
  2013-01-17 15:51 ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: Jiri Pirko @ 2013-01-17 10:25 UTC (permalink / raw)
  To: netdev; +Cc: davem

Since this error code means "No such file or directory", change this
value in team driver to ones which make more sense.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/team/team.c                   | 4 ++--
 drivers/net/team/team_mode_activebackup.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 70d5d6b..3d7cf6e 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1128,7 +1128,7 @@ static int team_port_del(struct team *team, struct net_device *port_dev)
 	if (!port || !team_port_find(team, port)) {
 		netdev_err(dev, "Device %s does not act as a port of this team\n",
 			   portname);
-		return -ENOENT;
+		return -ENODEV;
 	}
 
 	__team_option_inst_mark_removed_port(team, port);
@@ -2320,7 +2320,7 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
 			list_add(&opt_inst->tmp_list, &opt_inst_list);
 		}
 		if (!opt_found) {
-			err = -ENOENT;
+			err = -EINVAL;
 			goto team_put;
 		}
 	}
diff --git a/drivers/net/team/team_mode_activebackup.c b/drivers/net/team/team_mode_activebackup.c
index 6262b4d..2792e13 100644
--- a/drivers/net/team/team_mode_activebackup.c
+++ b/drivers/net/team/team_mode_activebackup.c
@@ -81,7 +81,7 @@ static int ab_active_port_set(struct team *team, struct team_gsetter_ctx *ctx)
 			return 0;
 		}
 	}
-	return -ENOENT;
+	return -ENODEV;
 }
 
 static const struct team_option ab_options[] = {
-- 
1.8.1

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

end of thread, other threads:[~2013-01-17 21:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 10:25 [patch net-next] team: do not use -ENOENT Jiri Pirko
2013-01-17 15:51 ` Stephen Hemminger
2013-01-17 20:33   ` Jiri Pirko
2013-01-17 20:42     ` David Miller
2013-01-17 20:52       ` Jiri Pirko
2013-01-17 21:07         ` David Miller
2013-01-17 21:15           ` Jiri Pirko
2013-01-17 21:18             ` 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).