Commit 887e7423 authored by Jason Yan's avatar Jason Yan Committed by Kalle Valo

rtlwifi: rtl8723ae: fix warning comparison to bool

Fix the following coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:617:14-20: WARNING:
Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:622:13-19: WARNING:
Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:627:14-20: WARNING:
Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:632:13-19: WARNING:
Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:937:5-13: WARNING:
Comparison to bool
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420042658.18733-1-yanaijie@huawei.com
parent e8277abd
...@@ -614,22 +614,22 @@ static bool _rtl8723e_llt_table_init(struct ieee80211_hw *hw) ...@@ -614,22 +614,22 @@ static bool _rtl8723e_llt_table_init(struct ieee80211_hw *hw)
for (i = 0; i < (txpktbuf_bndy - 1); i++) { for (i = 0; i < (txpktbuf_bndy - 1); i++) {
status = _rtl8723e_llt_write(hw, i, i + 1); status = _rtl8723e_llt_write(hw, i, i + 1);
if (true != status) if (!status)
return status; return status;
} }
status = _rtl8723e_llt_write(hw, (txpktbuf_bndy - 1), 0xFF); status = _rtl8723e_llt_write(hw, (txpktbuf_bndy - 1), 0xFF);
if (true != status) if (!status)
return status; return status;
for (i = txpktbuf_bndy; i < maxpage; i++) { for (i = txpktbuf_bndy; i < maxpage; i++) {
status = _rtl8723e_llt_write(hw, i, (i + 1)); status = _rtl8723e_llt_write(hw, i, (i + 1));
if (true != status) if (!status)
return status; return status;
} }
status = _rtl8723e_llt_write(hw, maxpage, txpktbuf_bndy); status = _rtl8723e_llt_write(hw, maxpage, txpktbuf_bndy);
if (true != status) if (!status)
return status; return status;
rtl_write_byte(rtlpriv, REG_CR, 0xff); rtl_write_byte(rtlpriv, REG_CR, 0xff);
...@@ -934,7 +934,7 @@ int rtl8723e_hw_init(struct ieee80211_hw *hw) ...@@ -934,7 +934,7 @@ int rtl8723e_hw_init(struct ieee80211_hw *hw)
rtlpriv->intf_ops->disable_aspm(hw); rtlpriv->intf_ops->disable_aspm(hw);
rtstatus = _rtl8712e_init_mac(hw); rtstatus = _rtl8712e_init_mac(hw);
if (rtstatus != true) { if (!rtstatus) {
pr_err("Init MAC failed\n"); pr_err("Init MAC failed\n");
err = 1; err = 1;
goto exit; goto exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment