summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2018-09-21 02:48:29 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-09 10:24:03 +0200
commitb112fc35a674160ad870249f1378e646258bdcab (patch)
treec7f34ddd7e609e1ea514bf22bc9146ba5e2c34b9
parente882472d12176e185f9d1ff1f58aef314631e630 (diff)
downloadlinux-b112fc35a674160ad870249f1378e646258bdcab.tar.gz
linux-b112fc35a674160ad870249f1378e646258bdcab.tar.bz2
linux-b112fc35a674160ad870249f1378e646258bdcab.zip
rsi: Remove unnecessary boolean condition
commit f613e4803dd6d1f41a86f6406d4c994fa3d387a0 upstream. Clang warns that the address of a pointer will always evaluated as true in a boolean context. drivers/net/wireless/rsi/rsi_91x_mac80211.c:927:50: warning: address of array 'key->key' will always evaluate to 'true' [-Wpointer-bool-conversion] if (vif->type == NL80211_IFTYPE_STATION && key->key && ~~ ~~~~~^~~ 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/136 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/wireless/rsi/rsi_91x_mac80211.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 69cd2c2c30ef..4445a53e9f0b 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -924,7 +924,7 @@ static int rsi_hal_key_config(struct ieee80211_hw *hw,
if (status)
return status;
- if (vif->type == NL80211_IFTYPE_STATION && key->key &&
+ if (vif->type == NL80211_IFTYPE_STATION &&
(key->cipher == WLAN_CIPHER_SUITE_WEP104 ||
key->cipher == WLAN_CIPHER_SUITE_WEP40)) {
if (!rsi_send_block_unblock_frame(adapter->priv, false))