From: Johannes Berg Date: Fri, 11 Nov 2011 19:22:30 +0000 (+0100) Subject: mac80211: fix warning in ieee80211_probe_client X-Git-Tag: v3.3-rc1~182^2~44^2~402 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4487c2d0edaf1332d7a9f11b5661044955ef5e2;p=platform%2Fkernel%2Flinux-3.10.git 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 Signed-off-by: John W. Linville --- diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index c2416fb..1063a7e 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 |