[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1428692430-14465-3-git-send-email-xiyou.wangcong@gmail.com>
Date: Fri, 10 Apr 2015 12:00:27 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: netdev@...r.kernel.org
Cc: Tom Herbert <tom@...bertland.com>,
Cong Wang <xiyou.wangcong@...il.com>
Subject: [Patch net-next v2 2/5] fou: exit early when parsing config fails
Not a big deal, just for corretness.
Cc: Tom Herbert <tom@...bertland.com>
Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
---
net/ipv4/fou.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c
index c8db627..ad0ee82 100644
--- a/net/ipv4/fou.c
+++ b/net/ipv4/fou.c
@@ -605,8 +605,11 @@ static int fou_nl_cmd_add_port(struct sk_buff *skb, struct genl_info *info)
static int fou_nl_cmd_rm_port(struct sk_buff *skb, struct genl_info *info)
{
struct fou_cfg cfg;
+ int err;
- parse_nl_config(info, &cfg);
+ err = parse_nl_config(info, &cfg);
+ if (err)
+ return err;
return fou_destroy(&init_net, &cfg);
}
--
1.8.3.1
--
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