* [patch] mac80211: silence NULL dereference warning
@ 2012-11-27 17:31 Dan Carpenter
2012-11-28 12:45 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-11-27 17:31 UTC (permalink / raw)
To: John W. Linville; +Cc: Johannes Berg, linux-wireless, kernel-janitors
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 <dan.carpenter@oracle.com>
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index ec15a49..d923058 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;
}
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-28 12:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 17:31 [patch] mac80211: silence NULL dereference warning Dan Carpenter
2012-11-28 12:45 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).