diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-11-11 14:22:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-11 14:29:35 -0500 |
commit | b4487c2d0edaf1332d7a9f11b5661044955ef5e2 (patch) | |
tree | c53963fb22579baf8cdec89ec0bbb07bf025e8ea /net/mac80211/cfg.c | |
parent | 731f8e1c41a4d0ffb589e2395f931f8a1aa6c6a4 (diff) |
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>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 9 |
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, | |||
2570 | 2570 | ||
2571 | rcu_read_lock(); | 2571 | rcu_read_lock(); |
2572 | sta = sta_info_get(sdata, peer); | 2572 | sta = sta_info_get(sdata, peer); |
2573 | if (sta) | 2573 | if (sta) { |
2574 | qos = test_sta_flag(sta, WLAN_STA_WME); | 2574 | qos = test_sta_flag(sta, WLAN_STA_WME); |
2575 | rcu_read_unlock(); | 2575 | rcu_read_unlock(); |
2576 | 2576 | } else { | |
2577 | if (!sta) | 2577 | rcu_read_unlock(); |
2578 | return -ENOLINK; | 2578 | return -ENOLINK; |
2579 | } | ||
2579 | 2580 | ||
2580 | if (qos) { | 2581 | if (qos) { |
2581 | fc = cpu_to_le16(IEEE80211_FTYPE_DATA | | 2582 | fc = cpu_to_le16(IEEE80211_FTYPE_DATA | |