Commit 7949513b authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by John W. Linville

net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variable

There is a risk that the variables will be used without being initialized.
Have also moved variable to the part of the code where it is used.

This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 57eaeb6e
...@@ -203,11 +203,12 @@ u32 rtl92d_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask) ...@@ -203,11 +203,12 @@ u32 rtl92d_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtlpriv); struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
u32 returnvalue, originalvalue, bitshift; u32 returnvalue, originalvalue, bitshift;
u8 dbi_direct;
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "regaddr(%#x), bitmask(%#x)\n", RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "regaddr(%#x), bitmask(%#x)\n",
regaddr, bitmask); regaddr, bitmask);
if (rtlhal->during_mac1init_radioa || rtlhal->during_mac0init_radiob) { if (rtlhal->during_mac1init_radioa || rtlhal->during_mac0init_radiob) {
u8 dbi_direct = 0;
/* mac1 use phy0 read radio_b. */ /* mac1 use phy0 read radio_b. */
/* mac0 use phy1 read radio_b. */ /* mac0 use phy1 read radio_b. */
if (rtlhal->during_mac1init_radioa) if (rtlhal->during_mac1init_radioa)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment