net/sched/sch_hfsc.c: add unlikely() in qdisc_peek_len()
authorMichal Soltys <soltys@ziu.info>
Thu, 30 Jun 2016 00:26:45 +0000 (02:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 09:03:43 +0000 (05:03 -0400)
The condition can only succeed on wrong configurations.

Signed-off-by: Michal Soltys <soltys@ziu.info>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_hfsc.c

index 6d6df6b2d38fd5b509f4c49b04126a374cfe1ee2..e2244bb78130455e6abaf5120fcce1c628242ea4 100644 (file)
@@ -882,7 +882,7 @@ qdisc_peek_len(struct Qdisc *sch)
        unsigned int len;
 
        skb = sch->ops->peek(sch);
-       if (skb == NULL) {
+       if (unlikely(skb == NULL)) {
                qdisc_warn_nonwc("qdisc_peek_len", sch);
                return 0;
        }