From: Dan Carpenter Date: Tue, 27 Nov 2012 17:31:19 +0000 (+0300) Subject: mac80211: fix potential NULL dereference X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=0624760c96da3ffeaec8027a016475ae752d75e1;p=linux-edison.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 9b13b8b2424..db343fa8033 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; } }