From: Ben Pfaff Date: Tue, 1 Mar 2011 23:33:40 +0000 (-0800) Subject: datapath: Avoid duplicate test in tnl_free_linked_skbs(). X-Git-Tag: v1.1.0~200 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=cb034511802ff7516ca2a94da1e161965fb80ad0;p=sliver-openvswitch.git datapath: Avoid duplicate test in tnl_free_linked_skbs(). 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 Acked-by: Jesse Gross --- diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 07bb00b62..7e0c8ee8c 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);