rtlwifi: btcoex: fix issue possible condition with no effect (if == else)
authorHariprasad Kelam <hariprasad.kelam@gmail.com>
Fri, 12 Jul 2019 19:15:35 +0000 (00:45 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Jul 2019 11:52:37 +0000 (14:52 +0300)
fix below issue reported by coccicheck
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:514:1-3:
WARNING: possible condition with no effect (if == else)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c

index 152242ac0aa5c8d899d70253b4e798d005e5620d..191dafd031893f9ce62340ab321bdcf56cae3b45 100644 (file)
@@ -509,13 +509,7 @@ static u32 halbtc_get_wifi_link_status(struct btc_coexist *btcoexist)
 
 static s32 halbtc_get_wifi_rssi(struct rtl_priv *rtlpriv)
 {
-       int undec_sm_pwdb = 0;
-
-       if (rtlpriv->mac80211.link_state >= MAC80211_LINKED)
-               undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
-       else /* associated entry pwdb */
-               undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
-       return undec_sm_pwdb;
+       return rtlpriv->dm.undec_sm_pwdb;
 }
 
 static bool halbtc_get(void *void_btcoexist, u8 get_type, void *out_buf)