aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sched/sch_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 1367aa21fad5..903e4188b6ca 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -809,7 +809,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
809 stab = qdisc_get_stab(tca[TCA_STAB]); 809 stab = qdisc_get_stab(tca[TCA_STAB]);
810 if (IS_ERR(stab)) { 810 if (IS_ERR(stab)) {
811 err = PTR_ERR(stab); 811 err = PTR_ERR(stab);
812 goto err_out3; 812 goto err_out4;
813 } 813 }
814 sch->stab = stab; 814 sch->stab = stab;
815 } 815 }
@@ -838,7 +838,6 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
838 return sch; 838 return sch;
839 } 839 }
840err_out3: 840err_out3:
841 qdisc_put_stab(sch->stab);
842 dev_put(dev); 841 dev_put(dev);
843 kfree((char *) sch - sch->padded); 842 kfree((char *) sch - sch->padded);
844err_out2: 843err_out2:
@@ -852,6 +851,7 @@ err_out4:
852 * Any broken qdiscs that would require a ops->reset() here? 851 * Any broken qdiscs that would require a ops->reset() here?
853 * The qdisc was never in action so it shouldn't be necessary. 852 * The qdisc was never in action so it shouldn't be necessary.
854 */ 853 */
854 qdisc_put_stab(sch->stab);
855 if (ops->destroy) 855 if (ops->destroy)
856 ops->destroy(sch); 856 ops->destroy(sch);
857 goto err_out3; 857 goto err_out3;