From: Jamal Hadi Salim Date: Wed, 13 Aug 2008 09:41:45 +0000 (-0700) Subject: net-sched: fix Action flushing return code X-Git-Tag: v2.6.27-rc4~103^2~32 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=36723873b664fb6b5cfe06d291df948126e43f50;p=linux-2.6-omap-h63xx.git net-sched: fix Action flushing return code Flushing must consistently return ENOMEM on failure of any allocation Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 88b57331d13..9974b3f04f0 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);