diff mbox

[1/1,v2] rtlwifi: remove superfluous condition

Message ID 1470165981-6241-1-git-send-email-xypron.glpk@gmx.de
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Heinrich Schuchardt Aug. 2, 2016, 7:26 p.m. UTC
If sta == NULL, the changed line will not be reached.
So no need to check that sta != NULL here.

v2:
	fix typo

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Aug. 3, 2016, 6:01 a.m. UTC | #1
Heinrich Schuchardt <xypron.glpk@gmx.de> writes:

> If sta == NULL, the changed line will not be reached.
> So no need to check that sta != NULL here.
>
> v2:
> 	fix typo
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>  drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

The change log goes under the "---" line so that git can automatically
strip it away while committing the patch. I can fix it this time but
please keep this in mind in the future.
Kalle Valo Sept. 3, 2016, 10:03 a.m. UTC | #2
Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> If sta == NULL, the changed line will not be reached.
> So no need to check that sta != NULL here.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Thanks, 1 patch applied to wireless-drivers-next.git:

f898005ff99f rtlwifi: remove superfluous condition
diff mbox

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index 41f77f8..7aee5ebb1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -1135,7 +1135,7 @@  static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
 					mac->mode = WIRELESS_MODE_AC_24G;
 			}
 
-			if (vif->type == NL80211_IFTYPE_STATION && sta)
+			if (vif->type == NL80211_IFTYPE_STATION)
 				rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
 			rcu_read_unlock();