OSDN Git Service

rtlwifi: rtl8192ee: Remove redundant initialization of variable version
authorColin Ian King <colin.king@canonical.com>
Thu, 7 Oct 2021 16:37:22 +0000 (17:37 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 13 Oct 2021 06:20:30 +0000 (09:20 +0300)
The variable version is being initialized with a value that is
never read, it is being updated afterwards in both branches of
an if statement. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211007163722.20165-1-colin.king@canonical.com
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c

index 88fa2e5..7618928 100644 (file)
@@ -1430,7 +1430,7 @@ static enum version_8192e _rtl92ee_read_chip_version(struct ieee80211_hw *hw)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_phy *rtlphy = &rtlpriv->phy;
-       enum version_8192e version = VERSION_UNKNOWN;
+       enum version_8192e version;
        u32 value32;
 
        rtlphy->rf_type = RF_2T2R;