diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-02-09 10:54:24 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-02-10 09:38:42 +0200 |
commit | 15085446c171644c846000e2f1484fc8a127ec78 (patch) | |
tree | 54eb63a4af3a4c84fd53f2be3e9c85d36c70e47b /drivers | |
parent | 7dd56ea45a6686719a9d05c3e3f946a85809d322 (diff) | |
download | linux-15085446c171644c846000e2f1484fc8a127ec78.tar.bz2 |
rtlwifi: rtl8192se: Simplify bool comparison
Fix the follow coccicheck warnings:
./drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:2305:6-27:
WARNING: Comparison of 0/1 to bool variable.
./drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:1376:5-26:
WARNING: Comparison of 0/1 to bool variable.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1612839264-85773-1-git-send-email-jiapeng.chong@linux.alibaba.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c index 73a5d8a068fc..91199262aaca 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c @@ -1373,7 +1373,7 @@ static void _rtl92se_gen_refreshledstate(struct ieee80211_hw *hw) struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_led *pled0 = &rtlpriv->ledctl.sw_led0; - if (rtlpci->up_first_time == 1) + if (rtlpci->up_first_time) return; if (rtlpriv->psc.rfoff_reason == RF_CHANGE_BY_IPS) @@ -2302,7 +2302,7 @@ bool rtl92se_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid) bool turnonbypowerdomain = false; /* just 8191se can check gpio before firstup, 92c/92d have fixed it */ - if ((rtlpci->up_first_time == 1) || (rtlpci->being_init_adapter)) + if (rtlpci->up_first_time || rtlpci->being_init_adapter) return false; if (ppsc->swrf_processing) |