summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2020-04-26 12:41:15 +0300
committerKalle Valo <kvalo@codeaurora.org>2020-05-06 11:32:30 +0300
commitfb1a9fc550cf748ba1225d734539ae97b5699b02 (patch)
treec5451bea7a5a61c97f0bef313db3a49b6940a219 /drivers/net/wireless/realtek
parentc03e3fe91c1916e5adc97befee1ca5efe5c39bda (diff)
downloadlinux-fb1a9fc550cf748ba1225d734539ae97b5699b02.tar.xz
rtlwifi: use true,false for bool variable in rtl_init_rfkill()
The 'blocked' is a bool variable, and '==' expression itself is bool too. So no need to convert it to 0/1. This fixes the following coccicheck warning: drivers/net/wireless/realtek/rtlwifi/base.c:508:13-41: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200426094115.23294-1-yanaijie@huawei.com
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
index c75192c4447f..a4489b9302d4 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
@@ -505,7 +505,7 @@ void rtl_init_rfkill(struct ieee80211_hw *hw)
rtlpriv->rfkill.rfkill_state = radio_state;
- blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1;
+ blocked = rtlpriv->rfkill.rfkill_state != 1;
wiphy_rfkill_set_hw_state(hw->wiphy, blocked);
}