Subject: [PATCH]:net-sched: fix Action flushing return code

From: jamal <[email-masked]>
Date: Fri, 08 Aug 2008 09:47:05 -0400

This depends on previous patch "net-sched: Fix actions flushing".
Sorry - i noticed the discrepancy on the return codes only after i sent
the earlier patch.

cheers,
jamal
net-sched: fix Action flushing return code

Flushing must consistently return ENOMEM on failure of any allocation

Signed-off-by: Jamal Hadi Salim <[email-masked]>

---
commit 0ca9612919f1e4e579915f947dae05858d3b40f2
tree 5915d47665f6408042a805f45a1b4872be97c8ef
parent 4e13e943acd2aa262e1e10c7779518d3ca18cae3
author Jamal Hadi Salim <[email-masked]> Fri, 08 Aug 2008 09:44:22 -0400
committer Jamal Hadi Salim <[email-masked]> Fri, 08 Aug 2008 09:44:22 -0400

 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 88b5733..9974b3f 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);