From: Dan Carpenter Date: Mon, 7 Feb 2011 19:03:35 +0000 (+0300) Subject: mac80211: remove unneeded check X-Git-Tag: Ubuntu-5.10.0-12.13~25228^2~403^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3ad97fbcc233a295f2ccc2c6bdeb32323e360a5e;p=mirror_ubuntu-hirsute-kernel.git 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. Signed-off-by: Dan Carpenter Signed-off-by: John W. Linville --- diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 291516807fc4..38e593939727 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2245,7 +2245,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