2011-09-28 22:54:18

by Greg Dietsche

[permalink] [raw]
Subject: [PATCH] iwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_sta

From: Greg Dietsche <[email protected]>

both sta and lq_sta are guaranteed to be not null in the
calling function so we don't need to check them here.

Signed-off-by: Greg Dietsche <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 3789ff4..e5ea33b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2269,9 +2269,6 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
info->flags & IEEE80211_TX_CTL_NO_ACK)
return;

- if (!sta || !lq_sta)
- return;
-
lq_sta->supp_rates = sta->supp_rates[lq_sta->band];

tid = rs_tl_add_packet(lq_sta, hdr);
--
1.7.6.4



2011-09-28 23:05:51

by Wey-Yi Guy

[permalink] [raw]
Subject: Re: [PATCH] iwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_sta

On Wed, 2011-09-28 at 15:54 -0700, [email protected] wrote:
> From: Greg Dietsche <[email protected]>
>
> both sta and lq_sta are guaranteed to be not null in the
> calling function so we don't need to check them here.
>
> Signed-off-by: Greg Dietsche <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
> ---
> drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
you are correct

Wey