]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
rtlwifi: rtl8188ee: fix comparison pointer to bool warning in hw.c
authorZheng Bin <zhengbin13@huawei.com>
Thu, 10 Sep 2020 13:59:17 +0000 (21:59 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 16 Sep 2020 06:11:12 +0000 (09:11 +0300)
Fixes coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:777:14-20: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:782:13-19: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:787:14-20: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:792:13-19: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:871:6-33: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:1070:5-13: 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/20200910135917.143723-4-zhengbin13@huawei.com
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c

index 4c8d71fbdd7ae08c8aef0b8892faafc6f9b603c2..63f9ea21962f2548380b1045006ee232029b330d 100644 (file)
@@ -774,22 +774,22 @@ static bool _rtl88ee_llt_table_init(struct ieee80211_hw *hw)
 
        for (i = 0; i < (txpktbuf_bndy - 1); i++) {
                status = _rtl88ee_llt_write(hw, i, i + 1);
-               if (true != status)
+               if (!status)
                        return status;
        }
 
        status = _rtl88ee_llt_write(hw, (txpktbuf_bndy - 1), 0xFF);
-       if (true != status)
+       if (!status)
                return status;
 
        for (i = txpktbuf_bndy; i < maxpage; i++) {
                status = _rtl88ee_llt_write(hw, i, (i + 1));
-               if (true != status)
+               if (!status)
                        return status;
        }
 
        status = _rtl88ee_llt_write(hw, maxpage, txpktbuf_bndy);
-       if (true != status)
+       if (!status)
                return status;
 
        return true;
@@ -868,7 +868,7 @@ static bool _rtl88ee_init_mac(struct ieee80211_hw *hw)
        rtl_write_byte(rtlpriv, MSR, 0x00);
 
        if (!rtlhal->mac_func_enable) {
-               if (_rtl88ee_llt_table_init(hw) == false) {
+               if (!_rtl88ee_llt_table_init(hw)) {
                        rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
                                "LLT table init fail\n");
                        return false;
@@ -1067,7 +1067,7 @@ int rtl88ee_hw_init(struct ieee80211_hw *hw)
        }
 
        rtstatus = _rtl88ee_init_mac(hw);
-       if (rtstatus != true) {
+       if (!rtstatus) {
                pr_info("Init MAC failed\n");
                err = 1;
                goto exit;