Skip to contentSkip to conversation

mac80211: remove unneeded check

PATCH New Dan Carpenter 1 participant 1 message Feb 7, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: remove unneeded check

"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.

net/mac80211/tx.c +1 -1
index f305835..ce01bee 100644
@@ -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