DORMANTno replies

[patch] mac80211: remove unneeded check

From: Dan Carpenter <hidden>
Date: 2011-02-07 19:03:35
Also in: kernel-janitors
Subsystem: mac80211, the rest · Maintainers: Johannes Berg, Linus Torvalds

"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 <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help