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