From: Johannes Berg Date: Fri, 23 Jan 2015 10:36:54 +0000 (+0100) Subject: mac80211: tdls: remove shadowing variable X-Git-Tag: v5.15~16375^2~69^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6f5cc091b04c4364c7cd928cef3dff21e2bef55;p=platform%2Fkernel%2Flinux-starfive.git mac80211: tdls: remove shadowing variable There's no need to use another local 'sta' variable as the original (outer scope) one isn't needed any more and has become invalid anyway when exiting the RCU read section. Remove the inner scope one and along with it the useless NULL initialization. Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index 917088d..80b66ce 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c @@ -852,7 +852,6 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev, */ if ((action_code == WLAN_TDLS_TEARDOWN) && (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) { - struct sta_info *sta = NULL; bool try_resend; /* Should we keep skb for possible resend */ /* If not sending directly to peer - no point in keeping skb */