diff options
Diffstat (limited to 'net/sched/ematch.c')
-rw-r--r-- | net/sched/ematch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 88d93eb92507..aca233c2b848 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c | |||
@@ -441,7 +441,8 @@ int tcf_em_tree_dump(struct sk_buff *skb, struct tcf_ematch_tree *tree, int tlv) | |||
441 | if (top_start == NULL) | 441 | if (top_start == NULL) |
442 | goto nla_put_failure; | 442 | goto nla_put_failure; |
443 | 443 | ||
444 | NLA_PUT(skb, TCA_EMATCH_TREE_HDR, sizeof(tree->hdr), &tree->hdr); | 444 | if (nla_put(skb, TCA_EMATCH_TREE_HDR, sizeof(tree->hdr), &tree->hdr)) |
445 | goto nla_put_failure; | ||
445 | 446 | ||
446 | list_start = nla_nest_start(skb, TCA_EMATCH_TREE_LIST); | 447 | list_start = nla_nest_start(skb, TCA_EMATCH_TREE_LIST); |
447 | if (list_start == NULL) | 448 | if (list_start == NULL) |
@@ -457,7 +458,8 @@ int tcf_em_tree_dump(struct sk_buff *skb, struct tcf_ematch_tree *tree, int tlv) | |||
457 | .flags = em->flags | 458 | .flags = em->flags |
458 | }; | 459 | }; |
459 | 460 | ||
460 | NLA_PUT(skb, i + 1, sizeof(em_hdr), &em_hdr); | 461 | if (nla_put(skb, i + 1, sizeof(em_hdr), &em_hdr)) |
462 | goto nla_put_failure; | ||
461 | 463 | ||
462 | if (em->ops && em->ops->dump) { | 464 | if (em->ops && em->ops->dump) { |
463 | if (em->ops->dump(skb, em) < 0) | 465 | if (em->ops->dump(skb, em) < 0) |