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>
void tnl_free_linked_skbs(struct sk_buff *skb)
{
- if (unlikely(!skb))
- return;
-
while (skb) {
struct sk_buff *next = skb->next;
kfree_skb(skb);