From: Dan Carpenter Date: Tue, 27 Nov 2012 17:31:19 +0000 (+0300) Subject: mac80211: fix potential NULL dereference X-Git-Tag: v3.8-rc1~139^2~17^2^2~33 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0624760c96da3ffeaec8027a016475ae752d75e1;p=karo-tx-linux.git mac80211: fix potential NULL dereference Smatch complains that we could dereference skb later in the function. It's probably unlikely, but we may as well return here and avoid it. Signed-off-by: Dan Carpenter [change summary] Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 9b13b8b24245..db343fa8033c 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -49,7 +49,7 @@ static struct sk_buff *remove_monitor_info(struct ieee80211_local *local, /* driver bug */ WARN_ON(1); dev_kfree_skb(skb); - skb = NULL; + return NULL; } }