diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2015-04-10 15:00:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-12 21:25:13 -0400 |
commit | 67270636a8285166c4ee035e1b53e99a7c55d232 (patch) | |
tree | b11aef8193163d47b16bc5eb5a8a3f051553aa13 /net/ipv4 | |
parent | 9272f048727513c1b28e5cd7b1425dae49111d5d (diff) |
fou: exit early when parsing config fails
Not a big deal, just for corretness.
Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/fou.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c index c8db62718e5f..ad0ee827a0c0 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) | |||
605 | static int fou_nl_cmd_rm_port(struct sk_buff *skb, struct genl_info *info) | 605 | static int fou_nl_cmd_rm_port(struct sk_buff *skb, struct genl_info *info) |
606 | { | 606 | { |
607 | struct fou_cfg cfg; | 607 | struct fou_cfg cfg; |
608 | int err; | ||
608 | 609 | ||
609 | parse_nl_config(info, &cfg); | 610 | err = parse_nl_config(info, &cfg); |
611 | if (err) | ||
612 | return err; | ||
610 | 613 | ||
611 | return fou_destroy(&init_net, &cfg); | 614 | return fou_destroy(&init_net, &cfg); |
612 | } | 615 | } |