aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_multiq.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_multiq.c')
-rw-r--r--net/sched/sch_multiq.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
index a0ffe7158ff3..069f81c97277 100644
--- a/net/sched/sch_multiq.c
+++ b/net/sched/sch_multiq.c
@@ -298,9 +298,6 @@ static int multiq_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
298 struct multiq_sched_data *q = qdisc_priv(sch); 298 struct multiq_sched_data *q = qdisc_priv(sch);
299 unsigned long band = arg - 1; 299 unsigned long band = arg - 1;
300 300
301 if (band >= q->bands)
302 return -EINVAL;
303
304 if (new == NULL) 301 if (new == NULL)
305 new = &noop_qdisc; 302 new = &noop_qdisc;
306 303
@@ -320,9 +317,6 @@ multiq_leaf(struct Qdisc *sch, unsigned long arg)
320 struct multiq_sched_data *q = qdisc_priv(sch); 317 struct multiq_sched_data *q = qdisc_priv(sch);
321 unsigned long band = arg - 1; 318 unsigned long band = arg - 1;
322 319
323 if (band >= q->bands)
324 return NULL;
325
326 return q->queues[band]; 320 return q->queues[band];
327} 321}
328 322
@@ -353,11 +347,8 @@ static int multiq_dump_class(struct Qdisc *sch, unsigned long cl,
353{ 347{
354 struct multiq_sched_data *q = qdisc_priv(sch); 348 struct multiq_sched_data *q = qdisc_priv(sch);
355 349
356 if (cl - 1 > q->bands)
357 return -ENOENT;
358 tcm->tcm_handle |= TC_H_MIN(cl); 350 tcm->tcm_handle |= TC_H_MIN(cl);
359 if (q->queues[cl-1]) 351 tcm->tcm_info = q->queues[cl-1]->handle;
360 tcm->tcm_info = q->queues[cl-1]->handle;
361 return 0; 352 return 0;
362} 353}
363 354