diff options
-rw-r--r-- | net/sched/sch_htb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index b820a0ae7355..5070643ce534 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -726,7 +726,7 @@ static struct htb_class *htb_lookup_leaf(struct rb_root *tree, int prio, | |||
726 | u32 *pid; | 726 | u32 *pid; |
727 | } stk[TC_HTB_MAXDEPTH], *sp = stk; | 727 | } stk[TC_HTB_MAXDEPTH], *sp = stk; |
728 | 728 | ||
729 | WARN_ON(!tree->rb_node); | 729 | BUG_ON(!tree->rb_node); |
730 | sp->root = tree->rb_node; | 730 | sp->root = tree->rb_node; |
731 | sp->pptr = pptr; | 731 | sp->pptr = pptr; |
732 | sp->pid = pid; | 732 | sp->pid = pid; |
@@ -746,9 +746,10 @@ static struct htb_class *htb_lookup_leaf(struct rb_root *tree, int prio, | |||
746 | *sp->pptr = (*sp->pptr)->rb_left; | 746 | *sp->pptr = (*sp->pptr)->rb_left; |
747 | if (sp > stk) { | 747 | if (sp > stk) { |
748 | sp--; | 748 | sp--; |
749 | WARN_ON(!*sp->pptr); | 749 | if (!*sp->pptr) { |
750 | if (!*sp->pptr) | 750 | WARN_ON(1); |
751 | return NULL; | 751 | return NULL; |
752 | } | ||
752 | htb_next_rb_node(sp->pptr); | 753 | htb_next_rb_node(sp->pptr); |
753 | } | 754 | } |
754 | } else { | 755 | } else { |
@@ -779,8 +780,7 @@ static struct sk_buff *htb_dequeue_tree(struct htb_sched *q, int prio, | |||
779 | 780 | ||
780 | do { | 781 | do { |
781 | next: | 782 | next: |
782 | WARN_ON(!cl); | 783 | if (unlikely(!cl)) |
783 | if (!cl) | ||
784 | return NULL; | 784 | return NULL; |
785 | 785 | ||
786 | /* class can be empty - it is unlikely but can be true if leaf | 786 | /* class can be empty - it is unlikely but can be true if leaf |