From 130e380b4470d5c704b492a2beb631d84c93bf09 Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Wed, 17 Apr 2013 21:25:52 +0200 Subject: [PATCH] brcmutil: simplify brcmu_pkt_free_skb() The function brcmu_pkt_free_skb() use skb->destructor to decide how the sk_buff should be freed. However, when running AP mode with iptables configured this results in a kernel warning. Reviewed-by: Hante Meuleman Reviewed-by: Piotr Haber Signed-off-by: Arend van Spriel Signed-off-by: John W. Linville --- drivers/net/wireless/brcm80211/brcmutil/utils.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/brcm80211/brcmutil/utils.c b/drivers/net/wireless/brcm80211/brcmutil/utils.c index bf5e50fc21ba..0f7e1c7b6f58 100644 --- a/drivers/net/wireless/brcm80211/brcmutil/utils.c +++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c @@ -45,17 +45,9 @@ void brcmu_pkt_buf_free_skb(struct sk_buff *skb) { if (!skb) return; + WARN_ON(skb->next); - if (skb->destructor) - /* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if - * destructor exists - */ - dev_kfree_skb_any(skb); - else - /* can free immediately (even in_irq()) if destructor - * does not exist - */ - dev_kfree_skb(skb); + dev_kfree_skb_any(skb); } EXPORT_SYMBOL(brcmu_pkt_buf_free_skb); -- 2.39.5