summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-11 20:22:30 +0100
committerJohn W. Linville <linville@tuxdriver.com>2011-11-11 14:29:35 -0500
commitb4487c2d0edaf1332d7a9f11b5661044955ef5e2 (patch)
treec53963fb22579baf8cdec89ec0bbb07bf025e8ea
parent731f8e1c41a4d0ffb589e2395f931f8a1aa6c6a4 (diff)
downloadblackbird-op-linux-b4487c2d0edaf1332d7a9f11b5661044955ef5e2.tar.gz
blackbird-op-linux-b4487c2d0edaf1332d7a9f11b5661044955ef5e2.zip
mac80211: fix warning in ieee80211_probe_client
The warning is spurious -- if !sta we always exit without using the unassigned qos variable, and if we do find the sta we assign it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/cfg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index c2416fbd1b27..1063a7e57d62 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2570,12 +2570,13 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
rcu_read_lock();
sta = sta_info_get(sdata, peer);
- if (sta)
+ if (sta) {
qos = test_sta_flag(sta, WLAN_STA_WME);
- rcu_read_unlock();
-
- if (!sta)
+ rcu_read_unlock();
+ } else {
+ rcu_read_unlock();
return -ENOLINK;
+ }
if (qos) {
fc = cpu_to_le16(IEEE80211_FTYPE_DATA |
OpenPOWER on IntegriCloud