summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_red.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-09-04 06:41:17 +0000
committerDavid S. Miller <davem@davemloft.net>2009-09-06 02:07:02 -0700
commit5b9a9ccfad8553dbf7a9b17ba78bad70215ed0e2 (patch)
tree1454e8121fef6635a615f6766b3fdbff678ae63d /net/sched/sch_red.c
parentde6d5cdf881353f83006d5f3e28ac4fffd42145e (diff)
downloadlinux-5b9a9ccfad8553dbf7a9b17ba78bad70215ed0e2.tar.gz
linux-5b9a9ccfad8553dbf7a9b17ba78bad70215ed0e2.tar.bz2
linux-5b9a9ccfad8553dbf7a9b17ba78bad70215ed0e2.zip
net_sched: remove some unnecessary checks in classful schedulers
The class argument to the ->graft(), ->leaf(), ->dump(), ->dump_stats() all originate from either ->get() or ->walk() and are always valid. Remove unnecessary checks. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_red.c')
-rw-r--r--net/sched/sch_red.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index a2c4d1aa3cb1..072cdf442f8e 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -268,8 +268,6 @@ static int red_dump_class(struct Qdisc *sch, unsigned long cl,
{
struct red_sched_data *q = qdisc_priv(sch);
- if (cl != 1)
- return -ENOENT;
tcm->tcm_handle |= TC_H_MIN(1);
tcm->tcm_info = q->qdisc->handle;
return 0;