diff options
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r-- | net/sched/cls_api.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index d870478e3640..92fa1559c211 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/kmod.h> | 24 | #include <linux/kmod.h> |
25 | #include <linux/netlink.h> | 25 | #include <linux/netlink.h> |
26 | #include <linux/err.h> | ||
26 | #include <net/net_namespace.h> | 27 | #include <net/net_namespace.h> |
27 | #include <net/sock.h> | 28 | #include <net/sock.h> |
28 | #include <net/netlink.h> | 29 | #include <net/netlink.h> |
@@ -487,23 +488,22 @@ int tcf_exts_validate(struct tcf_proto *tp, struct nlattr **tb, | |||
487 | 488 | ||
488 | #ifdef CONFIG_NET_CLS_ACT | 489 | #ifdef CONFIG_NET_CLS_ACT |
489 | { | 490 | { |
490 | int err; | ||
491 | struct tc_action *act; | 491 | struct tc_action *act; |
492 | 492 | ||
493 | if (map->police && tb[map->police]) { | 493 | if (map->police && tb[map->police]) { |
494 | act = tcf_action_init_1(tb[map->police], rate_tlv, | 494 | act = tcf_action_init_1(tb[map->police], rate_tlv, |
495 | "police", TCA_ACT_NOREPLACE, | 495 | "police", TCA_ACT_NOREPLACE, |
496 | TCA_ACT_BIND, &err); | 496 | TCA_ACT_BIND); |
497 | if (act == NULL) | 497 | if (IS_ERR(act)) |
498 | return err; | 498 | return PTR_ERR(act); |
499 | 499 | ||
500 | act->type = TCA_OLD_COMPAT; | 500 | act->type = TCA_OLD_COMPAT; |
501 | exts->action = act; | 501 | exts->action = act; |
502 | } else if (map->action && tb[map->action]) { | 502 | } else if (map->action && tb[map->action]) { |
503 | act = tcf_action_init(tb[map->action], rate_tlv, NULL, | 503 | act = tcf_action_init(tb[map->action], rate_tlv, NULL, |
504 | TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err); | 504 | TCA_ACT_NOREPLACE, TCA_ACT_BIND); |
505 | if (act == NULL) | 505 | if (IS_ERR(act)) |
506 | return err; | 506 | return PTR_ERR(act); |
507 | 507 | ||
508 | exts->action = act; | 508 | exts->action = act; |
509 | } | 509 | } |