datapath: Avoid duplicate test in tnl_free_linked_skbs().
authorBen Pfaff <blp@nicira.com>
Tue, 1 Mar 2011 23:33:40 +0000 (15:33 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 2 Mar 2011 22:34:08 +0000 (14:34 -0800)
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 <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/tunnel.c

index 07bb00b6265e1355cdf54a29d0e1be42761b9609..7e0c8ee8c90fa555481a35c525a947f16f01bed8 100644 (file)
@@ -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);