I don't see the value in testing 'skb' for nonnull twice.  This is only
called on error paths, so it seems really doubtful to me that there is any
value in the "unlikely", either.  (It could be put into the "while"
expression if it is valuable.)

Signed-off-by: Ben Pfaff <[email protected]>
---
 datapath/tunnel.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index 07bb00b..7e0c8ee 100644
--- a/datapath/tunnel.c
+++ b/datapath/tunnel.c
@@ -1571,9 +1571,6 @@ const unsigned char *tnl_get_addr(const struct vport 
*vport)
 
 void tnl_free_linked_skbs(struct sk_buff *skb)
 {
-       if (unlikely(!skb))
-               return;
-
        while (skb) {
                struct sk_buff *next = skb->next;
                kfree_skb(skb);
-- 
1.7.1


_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev_openvswitch.org

Reply via email to