[6/6] staging: rtl8192e: Remove repeated set to zero of powerlevel and friend

Message ID 50f28816aa006821d3e3a8346e39ae68c4d53963.1674244819.git.philipp.g.hortmann@gmail.com
State New
Headers
Series Remove several variables that are zero from struct r8192_priv |

Commit Message

Philipp Hortmann Jan. 20, 2023, 8:18 p.m. UTC
  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@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
  

Patch

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;