aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/ematch.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-23 23:33:32 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:11:18 -0500
commitcee63723b358e594225e812d6e14a2a0abfd5c88 (patch)
tree847f929e0f445cca8cdf55d7c17a56b0d0f2ec68 /net/sched/ematch.c
parentab27cfb85c5778400740ad0c401bde65616774eb (diff)
[NET_SCHED]: Propagate nla_parse return value
nla_parse() returns more detailed errno codes, propagate them back on error. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/ematch.c')
-rw-r--r--net/sched/ematch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 72d9b2735245..d2b480f01a40 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -301,7 +301,7 @@ errout:
301int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla, 301int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla,
302 struct tcf_ematch_tree *tree) 302 struct tcf_ematch_tree *tree)
303{ 303{
304 int idx, list_len, matches_len, err = -EINVAL; 304 int idx, list_len, matches_len, err;
305 struct nlattr *tb[TCA_EMATCH_TREE_MAX + 1]; 305 struct nlattr *tb[TCA_EMATCH_TREE_MAX + 1];
306 struct nlattr *rt_match, *rt_hdr, *rt_list; 306 struct nlattr *rt_match, *rt_hdr, *rt_list;
307 struct tcf_ematch_tree_hdr *tree_hdr; 307 struct tcf_ematch_tree_hdr *tree_hdr;
@@ -312,9 +312,11 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla,
312 return 0; 312 return 0;
313 } 313 }
314 314
315 if (nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, NULL) < 0) 315 err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, NULL);
316 if (err < 0)
316 goto errout; 317 goto errout;
317 318
319 err = -EINVAL;
318 rt_hdr = tb[TCA_EMATCH_TREE_HDR]; 320 rt_hdr = tb[TCA_EMATCH_TREE_HDR];
319 rt_list = tb[TCA_EMATCH_TREE_LIST]; 321 rt_list = tb[TCA_EMATCH_TREE_LIST];
320 322