From cb034511802ff7516ca2a94da1e161965fb80ad0 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 1 Mar 2011 15:33:40 -0800 Subject: [PATCH] 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 --- datapath/tunnel.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 07bb00b6..7e0c8ee8 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); -- 2.30.2