* [patch] mac80211: remove unneeded check
@ 2011-02-07 19:03 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-02-07 19:03 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless, kernel-janitors
"ap" is the address of sdata->u.ap so it can never be NULL here. Also
we dereferenced it on the previous line. I removed the check.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f305835..ce01bee 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2242,7 +2242,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
if (sdata->vif.type == NL80211_IFTYPE_AP) {
ap = &sdata->u.ap;
beacon = rcu_dereference(ap->beacon);
- if (ap && beacon) {
+ if (beacon) {
/*
* headroom, head length,
* tail length and maximum TIM length
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-07 19:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07 19:03 [patch] mac80211: remove unneeded check Dan Carpenter
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).