mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
9272f04872
commit
67270636a8
@ -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)
|
static int fou_nl_cmd_rm_port(struct sk_buff *skb, struct genl_info *info)
|
||||||
{
|
{
|
||||||
struct fou_cfg cfg;
|
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);
|
return fou_destroy(&init_net, &cfg);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user