rtlwifi: rtl8821ae: fix comparison to bool warning in phy.c
authorZheng Bin <zhengbin13@huawei.com>
Fri, 18 Sep 2020 10:25:01 +0000 (18:25 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 21 Sep 2020 13:02:45 +0000 (16:02 +0300)
Fixes coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1816:5-13: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1825:5-13: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1839:5-13: WARNING: Comparison to bool

Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200918102505.16036-6-zhengbin13@huawei.com
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c

index 7832fae3d00f39c5bf0e9db6843ae01689ff17b7..38669b4d619086aaa9d7fb63c2abef40c5787398 100644 (file)
@@ -1813,7 +1813,7 @@ static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)
 
        rtstatus = _rtl8821ae_phy_config_bb_with_headerfile(hw,
                                                       BASEBAND_CONFIG_PHY_REG);
-       if (rtstatus != true) {
+       if (!rtstatus) {
                pr_err("Write BB Reg Fail!!\n");
                return false;
        }
@@ -1822,7 +1822,7 @@ static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)
                rtstatus = _rtl8821ae_phy_config_bb_with_pgheaderfile(hw,
                                                    BASEBAND_CONFIG_PHY_REG);
        }
-       if (rtstatus != true) {
+       if (!rtstatus) {
                pr_err("BB_PG Reg Fail!!\n");
                return false;
        }
@@ -1836,7 +1836,7 @@ static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)
        rtstatus = _rtl8821ae_phy_config_bb_with_headerfile(hw,
                                                BASEBAND_CONFIG_AGC_TAB);
 
-       if (rtstatus != true) {
+       if (!rtstatus) {
                pr_err("AGC Table Fail\n");
                return false;
        }