Commit 881fff34 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 73c73eea
...@@ -383,7 +383,6 @@ static void dsmark_destroy(struct Qdisc *sch) ...@@ -383,7 +383,6 @@ static void dsmark_destroy(struct Qdisc *sch)
tcf_destroy(tp); tcf_destroy(tp);
} }
qdisc_destroy(p->q); qdisc_destroy(p->q);
p->q = &noop_qdisc;
kfree(p->mask); kfree(p->mask);
} }
......
...@@ -812,9 +812,7 @@ static void netem_destroy(struct Qdisc *sch) ...@@ -812,9 +812,7 @@ static void netem_destroy(struct Qdisc *sch)
struct netem_sched_data *q = (struct netem_sched_data *)sch->data; struct netem_sched_data *q = (struct netem_sched_data *)sch->data;
del_timer_sync(&q->timer); del_timer_sync(&q->timer);
qdisc_destroy(q->qdisc); qdisc_destroy(q->qdisc);
q->qdisc = &noop_qdisc;
} }
static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) static int netem_dump(struct Qdisc *sch, struct sk_buff *skb)
......
...@@ -208,10 +208,8 @@ prio_destroy(struct Qdisc* sch) ...@@ -208,10 +208,8 @@ prio_destroy(struct Qdisc* sch)
tcf_destroy(tp); tcf_destroy(tp);
} }
for (prio=0; prio<q->bands; prio++) { for (prio=0; prio<q->bands; prio++)
qdisc_destroy(q->queues[prio]); qdisc_destroy(q->queues[prio]);
q->queues[prio] = &noop_qdisc;
}
} }
static int prio_tune(struct Qdisc *sch, struct rtattr *opt) static int prio_tune(struct Qdisc *sch, struct rtattr *opt)
......
...@@ -434,10 +434,6 @@ static int red_dump(struct Qdisc *sch, struct sk_buff *skb) ...@@ -434,10 +434,6 @@ static int red_dump(struct Qdisc *sch, struct sk_buff *skb)
return -1; return -1;
} }
static void red_destroy(struct Qdisc *sch)
{
}
static struct Qdisc_ops red_qdisc_ops = { static struct Qdisc_ops red_qdisc_ops = {
.next = NULL, .next = NULL,
.cl_ops = NULL, .cl_ops = NULL,
...@@ -449,7 +445,6 @@ static struct Qdisc_ops red_qdisc_ops = { ...@@ -449,7 +445,6 @@ static struct Qdisc_ops red_qdisc_ops = {
.drop = red_drop, .drop = red_drop,
.init = red_init, .init = red_init,
.reset = red_reset, .reset = red_reset,
.destroy = red_destroy,
.change = red_change, .change = red_change,
.dump = red_dump, .dump = red_dump,
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
...@@ -393,7 +393,6 @@ static void tbf_destroy(struct Qdisc *sch) ...@@ -393,7 +393,6 @@ static void tbf_destroy(struct Qdisc *sch)
qdisc_put_rtab(q->R_tab); qdisc_put_rtab(q->R_tab);
qdisc_destroy(q->qdisc); qdisc_destroy(q->qdisc);
q->qdisc = &noop_qdisc;
} }
static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb) static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment