aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sched/ematch.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 74ff918455a..d421ec728ee 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -312,10 +312,9 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla,
struct tcf_ematch_tree_hdr *tree_hdr;
struct tcf_ematch *em;
- if (!nla) {
- memset(tree, 0, sizeof(*tree));
+ memset(tree, 0, sizeof(*tree));
+ if (!nla)
return 0;
- }
err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy);
if (err < 0)