Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtlwifi: rtl8723ae: fix comparison pointer to bool warning in phy.c

Fixes coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:191:5-13: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:205:5-13: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:211:5-13: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:625:5-30: WARNING: Comparison to bool

Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200910141642.127006-4-zhengbin13@huawei.com

authored by

Zheng Bin and committed by
Kalle Valo
f26506f0 9d886ac4

+4 -4
+4 -4
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c
··· 188 188 rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, "\n"); 189 189 rtstatus = _rtl8723e_phy_config_bb_with_headerfile(hw, 190 190 BASEBAND_CONFIG_PHY_REG); 191 - if (rtstatus != true) { 191 + if (!rtstatus) { 192 192 pr_err("Write BB Reg Fail!!\n"); 193 193 return false; 194 194 } ··· 202 202 rtstatus = _rtl8723e_phy_config_bb_with_pgheaderfile(hw, 203 203 BASEBAND_CONFIG_PHY_REG); 204 204 } 205 - if (rtstatus != true) { 205 + if (!rtstatus) { 206 206 pr_err("BB_PG Reg Fail!!\n"); 207 207 return false; 208 208 } 209 209 rtstatus = 210 210 _rtl8723e_phy_config_bb_with_headerfile(hw, BASEBAND_CONFIG_AGC_TAB); 211 - if (rtstatus != true) { 211 + if (!rtstatus) { 212 212 pr_err("AGC Table Fail\n"); 213 213 return false; 214 214 } ··· 622 622 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); 623 623 u8 cckpowerlevel[2], ofdmpowerlevel[2]; 624 624 625 - if (rtlefuse->txpwr_fromeprom == false) 625 + if (!rtlefuse->txpwr_fromeprom) 626 626 return; 627 627 _rtl8723e_get_txpower_index(hw, channel, 628 628 &cckpowerlevel[0], &ofdmpowerlevel[0]);