summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmutil
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-05-15 12:00:27 +0300
committerJohn W. Linville <linville@tuxdriver.com>2012-06-05 15:23:20 -0400
commit1dacd1980d5ba732de1b69999fd8995b3b2b724b (patch)
tree9378cb9de978448430b07382a2421fc9d70c25d8 /drivers/net/wireless/brcm80211/brcmutil
parent9be02923371718265ea050a5415dc4fefc4e6a64 (diff)
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: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmutil')
-rw-r--r--drivers/net/wireless/brcm80211/brcmutil/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmutil/utils.c b/drivers/net/wireless/brcm80211/brcmutil/utils.c
index b45ab34cdfd..3e6405e06ac 100644
--- a/drivers/net/wireless/brcm80211/brcmutil/utils.c
+++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c
@@ -43,6 +43,8 @@ EXPORT_SYMBOL(brcmu_pkt_buf_get_skb);
/* Free the driver packet. Free the tag if present */
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