linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch -next 1/2] iwlwifi: fix double assign in iwl_start_tx_ba_trans_ready()
@ 2011-08-31  6:37 Dan Carpenter
  2011-08-31  6:41 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2011-08-31  6:37 UTC (permalink / raw)
  To: emmanuel.grumbach
  Cc: Wey-Yi Guy, Intel Linux Wireless, John W. Linville,
	open list:INTEL WIRELESS WI..., kernel-janitors

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

Signed-off-by: Dan Carpenter <error27@gmail.com>

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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch -next 1/2] iwlwifi: fix double assign in iwl_start_tx_ba_trans_ready()
  2011-08-31  6:37 [patch -next 1/2] iwlwifi: fix double assign in iwl_start_tx_ba_trans_ready() Dan Carpenter
@ 2011-08-31  6:41 ` Johannes Berg
  2011-08-31  9:34   ` Guy, Wey-Yi
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2011-08-31  6:41 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: emmanuel.grumbach, Wey-Yi Guy, Intel Linux Wireless,
	John W. Linville, open list:INTEL WIRELESS WI..., kernel-janitors

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 <johannes@sipsolutions.net>

> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> 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
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch -next 1/2] iwlwifi: fix double assign in iwl_start_tx_ba_trans_ready()
  2011-08-31  6:41 ` Johannes Berg
@ 2011-08-31  9:34   ` Guy, Wey-Yi
  0 siblings, 0 replies; 3+ messages in thread
From: Guy, Wey-Yi @ 2011-08-31  9:34 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Dan Carpenter, Grumbach, Emmanuel, Intel Linux Wireless,
	John W. Linville, open list:INTEL WIRELESS WI...,
	kernel-janitors@vger.kernel.org

On Tue, 2011-08-30 at 23:41 -0700, Johannes Berg wrote:
> 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 <johannes@sipsolutions.net>
> 
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> > 

Thanks
Wey


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-31 10:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-31  6:37 [patch -next 1/2] iwlwifi: fix double assign in iwl_start_tx_ba_trans_ready() Dan Carpenter
2011-08-31  6:41 ` Johannes Berg
2011-08-31  9:34   ` Guy, Wey-Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).