summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2020-04-29 22:09:24 +0800
committerKalle Valo <kvalo@codeaurora.org>2020-05-06 11:42:46 +0300
commit1b56bed20212390432541c7a54e5a70561809293 (patch)
tree0c31cdcdeb0d338be74107ad107b908b9f19ec23
parent4f5cf93395d747593c7e2cebdc32155931e03594 (diff)
rtlwifi: remove comparison of 0/1 to bool variable
The variable 'rtlpriv->rfkill.rfkill_state' is bool and can directly assigned to bool values. Fix the following coccicheck warning: drivers/net/wireless/realtek/rtlwifi/core.c:1725:14-42: 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/20200429140924.7750-1-yanaijie@huawei.com
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index f73e690bbe8e..4dd82c6052f0 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -1722,7 +1722,7 @@ static void rtl_op_rfkill_poll(struct ieee80211_hw *hw)
"wireless radio switch turned %s\n",
radio_state ? "on" : "off");
- blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1;
+ blocked = !rtlpriv->rfkill.rfkill_state;
wiphy_rfkill_set_hw_state(hw->wiphy, blocked);
}
}