diff mbox series

rtlwifi: rtl8192se: remove redundant rtl_get_bbreg call

Message ID 20221205085342.677329-1-pkosyh@yandex.ru
State New
Headers show
Series rtlwifi: rtl8192se: remove redundant rtl_get_bbreg call | expand

Commit Message

Peter Kosyh Dec. 5, 2022, 8:53 a.m. UTC
Extra rtl_get_bbreg looks like redundant reading. The read has
already been done in the "else" branch. Compile test only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Peter Kosyh <pkosyh@yandex.ru>
---
If this code is important for the operation of the hardware, then it would
be nice to comment on it.

 drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Kalle Valo Dec. 8, 2022, 2:52 p.m. UTC | #1
Peter Kosyh <pkosyh@yandex.ru> wrote:

> Extra rtl_get_bbreg() call looks like redundant reading. The read has
> already been done in the "else" branch. Compile test only.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Peter Kosyh <pkosyh@yandex.ru>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-next.git, thanks.

49ebca0d9018 wifi: rtlwifi: rtl8192se: remove redundant rtl_get_bbreg() call
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c
index aaa004d4d6d0..09591a0b5a81 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c
@@ -115,9 +115,6 @@  static u32 _rtl92s_phy_rf_serial_read(struct ieee80211_hw *hw,
 		retvalue = rtl_get_bbreg(hw, pphyreg->rf_rb,
 					 BLSSI_READBACK_DATA);
 
-	retvalue = rtl_get_bbreg(hw, pphyreg->rf_rb,
-				 BLSSI_READBACK_DATA);
-
 	rtl_dbg(rtlpriv, COMP_RF, DBG_TRACE, "RFR-%d Addr[0x%x]=0x%x\n",
 		rfpath, pphyreg->rf_rb, retvalue);