]> err.no Git - linux-2.6/blobdiff - net/sched/sch_netem.c
[ARM] 3261/2: remove phys_ram from struct machine_desc (part 3)
[linux-2.6] / net / sched / sch_netem.c
index ba528320483743dc0ef028b8e5bf08d981efbbf8..7228d30512c79466675276933268b6dcfc31972e 100644 (file)
@@ -252,9 +252,9 @@ static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch)
 static unsigned int netem_drop(struct Qdisc* sch)
 {
        struct netem_sched_data *q = qdisc_priv(sch);
-       unsigned int len;
+       unsigned int len = 0;
 
-       if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) {
+       if (q->qdisc->ops->drop && (len = q->qdisc->ops->drop(q->qdisc)) != 0) {
                sch->q.qlen--;
                sch->qstats.drops++;
        }