wifi: rtlwifi: rtl8192se: remove redundant rtl_get_bbreg() call
authorPeter Kosyh <pkosyh@yandex.ru>
Mon, 5 Dec 2022 08:53:42 +0000 (11:53 +0300)
committerKalle Valo <kvalo@kernel.org>
Thu, 8 Dec 2022 14:52:35 +0000 (16:52 +0200)
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>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221205085342.677329-1-pkosyh@yandex.ru
drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c

index aaa004d4d6d0a98e3690f9b23517a885d7c88d79..09591a0b5a818592a9262f9acdd009a55621b694 100644 (file)
@@ -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);