| To: | jamal <hadi@xxxxxxxxxx> |
|---|---|
| Subject: | [PATCH PKT_SCHED 8/17]: Return proper error codes in tcf_gact_init |
| From: | Patrick McHardy <kaber@xxxxxxxxx> |
| Date: | Thu, 30 Dec 2004 04:40:05 +0100 |
| Cc: | Maillist netdev <netdev@xxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 |
Return proper error codes in tcf_gact_init. # This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/12/30 02:29:53+01:00 kaber@xxxxxxxxxxxx
# [PKT_SCHED]: Return proper error codes in tcf_gact_init
#
# Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
#
# net/sched/gact.c
# 2004/12/30 02:29:47+01:00 kaber@xxxxxxxxxxxx +4 -7
# [PKT_SCHED]: Return proper error codes in tcf_gact_init
#
# Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
#
diff -Nru a/net/sched/gact.c b/net/sched/gact.c
--- a/net/sched/gact.c 2004-12-30 04:01:28 +01:00
+++ b/net/sched/gact.c 2004-12-30 04:01:28 +01:00
@@ -83,12 +83,9 @@
int ret = 0;
if (rtattr_parse(tb, TCA_GACT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < 0)
- return -1;
-
- if (tb[TCA_GACT_PARMS - 1] == NULL) {
- printk("BUG: tcf_gact_init called with NULL params\n");
- return -1;
- }
+ return -EINVAL;
+ if (tb[TCA_GACT_PARMS - 1] == NULL)
+ return -EINVAL;
parm = RTA_DATA(tb[TCA_GACT_PARMS - 1]);
#ifdef CONFIG_GACT_PROB
@@ -99,7 +96,7 @@
if (p == NULL) {
p = tcf_hash_create(parm, est, a, sizeof(*p), ovr, bind);
if (p == NULL)
- return -1;
+ return -ENOMEM;
else {
p->refcnt = 1;
ret = 1;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH PKT_SCHED 7/17]: Remove checks for impossible conditions in gact action, Patrick McHardy |
|---|---|
| Next by Date: | [PATCH PKT_SCHED 9/17]: Return -EOPNOTSUPP if gact probability is requested but not compiled in, Patrick McHardy |
| Previous by Thread: | [PATCH PKT_SCHED 7/17]: Remove checks for impossible conditions in gact action, Patrick McHardy |
| Next by Thread: | [PATCH PKT_SCHED 9/17]: Return -EOPNOTSUPP if gact probability is requested but not compiled in, Patrick McHardy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |