diff options
author | Jamal Hadi Salim <hadi@cyberus.ca> | 2008-08-13 02:41:45 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-13 02:41:45 -0700 |
commit | 36723873b664fb6b5cfe06d291df948126e43f50 (patch) | |
tree | fa4fdae50b25ff2ce8dd57cc9cb59ede897d4017 /net/sched/act_api.c | |
parent | f97017cdefefdb6a0e19266024b0c6f9fd411eeb (diff) | |
download | talos-op-linux-36723873b664fb6b5cfe06d291df948126e43f50.tar.gz talos-op-linux-36723873b664fb6b5cfe06d291df948126e43f50.zip |
net-sched: fix Action flushing return code
Flushing must consistently return ENOMEM on failure of any allocation
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r-- | net/sched/act_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 88b57331d130..9974b3f04f05 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -751,7 +751,7 @@ static int tca_action_flush(struct nlattr *nla, struct nlmsghdr *n, u32 pid) struct nlattr *tb[TCA_ACT_MAX+1]; struct nlattr *kind; struct tc_action *a = create_a(0); - int err = -EINVAL; + int err = -ENOMEM; if (a == NULL) { printk("tca_action_flush: couldnt create tc_action\n"); @@ -762,7 +762,7 @@ static int tca_action_flush(struct nlattr *nla, struct nlmsghdr *n, u32 pid) if (!skb) { printk("tca_action_flush: failed skb alloc\n"); kfree(a); - return -ENOBUFS; + return err; } b = skb_tail_pointer(skb); |