Commit 1dacd198 authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

brcm80211: brcmu_pkt_buf_free_skb() should handle NULL

This is potentially called with NULL pointers, for example, look at
brcmf_c_prec_enq().  Since it's a free() function, probably people
expect it to handle NULL pointers.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9be02923
...@@ -43,6 +43,8 @@ EXPORT_SYMBOL(brcmu_pkt_buf_get_skb); ...@@ -43,6 +43,8 @@ EXPORT_SYMBOL(brcmu_pkt_buf_get_skb);
/* Free the driver packet. Free the tag if present */ /* Free the driver packet. Free the tag if present */
void brcmu_pkt_buf_free_skb(struct sk_buff *skb) void brcmu_pkt_buf_free_skb(struct sk_buff *skb)
{ {
if (!skb)
return;
WARN_ON(skb->next); WARN_ON(skb->next);
if (skb->destructor) if (skb->destructor)
/* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if /* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment