[PATCH 6/6] staging: rtl8192e: Remove repeated set to zero of powerlevel and friend
From: Philipp Hortmann
Date: Fri Jan 20 2023 - 15:19:12 EST
Variables powerlevel and powerlevelOFDM24G are initialized to zero and
unchanged. No reason to set them to zero again. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index d56c58ecc19f..95a21859c7e0 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -591,13 +591,7 @@ void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
powerlevel = priv->tx_pwr_level_cck[channel - 1];
powerlevelOFDM24G = priv->tx_pwr_level_ofdm_24g[channel - 1];
} else if (priv->epromtype == EEPROM_93C56) {
- if (priv->rf_type == RF_1T2R) {
- powerlevel = 0;
- powerlevelOFDM24G = 0;
- } else if (priv->rf_type == RF_2T4R) {
- powerlevel = 0;
- powerlevelOFDM24G = 0;
-
+ if (priv->rf_type == RF_2T4R) {
priv->antenna_tx_pwr_diff[2] = 0;
priv->antenna_tx_pwr_diff[1] = 0;
priv->antenna_tx_pwr_diff[0] = 0;
--
2.39.0