diff options
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r-- | net/sched/sch_netem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index ba5283204837..7228d30512c7 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -252,9 +252,9 @@ static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch) | |||
252 | static unsigned int netem_drop(struct Qdisc* sch) | 252 | static unsigned int netem_drop(struct Qdisc* sch) |
253 | { | 253 | { |
254 | struct netem_sched_data *q = qdisc_priv(sch); | 254 | struct netem_sched_data *q = qdisc_priv(sch); |
255 | unsigned int len; | 255 | unsigned int len = 0; |
256 | 256 | ||
257 | if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { | 257 | if (q->qdisc->ops->drop && (len = q->qdisc->ops->drop(q->qdisc)) != 0) { |
258 | sch->q.qlen--; | 258 | sch->q.qlen--; |
259 | sch->qstats.drops++; | 259 | sch->qstats.drops++; |
260 | } | 260 | } |