From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Date: Wed, 31 Aug 2011 06:41:27 +0000 Subject: Re: [patch -next 1/2] iwlwifi: fix double assign in Message-Id: <1314772887.4161.17.camel@jlt3.sipsolutions.net> List-Id: References: <20110831063742.GC3705@shale.localdomain> (sfid-20110831_084010_132544_82772E48) In-Reply-To: <20110831063742.GC3705@shale.localdomain> (sfid-20110831_084010_132544_82772E48) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: emmanuel.grumbach@intel.com, Wey-Yi Guy , Intel Linux Wireless , "John W. Linville" , "open list:INTEL WIRELESS WI..." , kernel-janitors@vger.kernel.org On Wed, 2011-08-31 at 09:37 +0300, Dan Carpenter wrote: > "vif" is assigned twice. We can remove the first one. > > This silences a Smatch warning that "ctx" could be one step past the > end of the priv->contexts[] array. Good catch. Reviewed-by: Johannes Berg > Signed-off-by: Dan Carpenter > > diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c > index 20dd1a5..72b9203 100644 > --- a/drivers/net/wireless/iwlwifi/iwl-core.c > +++ b/drivers/net/wireless/iwlwifi/iwl-core.c > @@ -1842,7 +1842,7 @@ void iwl_start_tx_ba_trans_ready(struct iwl_priv *priv, > enum iwl_rxon_context_id ctx, > u8 sta_id, u8 tid) > { > - struct ieee80211_vif *vif = priv->contexts[ctx].vif; > + struct ieee80211_vif *vif; > u8 *addr = priv->stations[sta_id].sta.sta.addr; > > if (ctx = NUM_IWL_RXON_CTX) > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >