aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_mqprio.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c
index effd4ee0e880..ace37f9f1cd0 100644
--- a/net/sched/sch_mqprio.c
+++ b/net/sched/sch_mqprio.c
@@ -29,18 +29,18 @@ static void mqprio_destroy(struct Qdisc *sch)
29 struct mqprio_sched *priv = qdisc_priv(sch); 29 struct mqprio_sched *priv = qdisc_priv(sch);
30 unsigned int ntx; 30 unsigned int ntx;
31 31
32 if (!priv->qdiscs) 32 if (priv->qdiscs) {
33 return; 33 for (ntx = 0;
34 34 ntx < dev->num_tx_queues && priv->qdiscs[ntx];
35 for (ntx = 0; ntx < dev->num_tx_queues && priv->qdiscs[ntx]; ntx++) 35 ntx++)
36 qdisc_destroy(priv->qdiscs[ntx]); 36 qdisc_destroy(priv->qdiscs[ntx]);
37 kfree(priv->qdiscs);
38 }
37 39
38 if (priv->hw_owned && dev->netdev_ops->ndo_setup_tc) 40 if (priv->hw_owned && dev->netdev_ops->ndo_setup_tc)
39 dev->netdev_ops->ndo_setup_tc(dev, 0); 41 dev->netdev_ops->ndo_setup_tc(dev, 0);
40 else 42 else
41 netdev_set_num_tc(dev, 0); 43 netdev_set_num_tc(dev, 0);
42
43 kfree(priv->qdiscs);
44} 44}
45 45
46static int mqprio_parse_opt(struct net_device *dev, struct tc_mqprio_qopt *qopt) 46static int mqprio_parse_opt(struct net_device *dev, struct tc_mqprio_qopt *qopt)