summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt7601u
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2019-09-21 10:44:01 +0200
committerKalle Valo <kvalo@codeaurora.org>2019-10-01 11:19:20 +0200
commit15e14f76f85f4f0eab3b8146e1cd3c58ce272823 (patch)
treef206e03676ba0e4f7088a3a29a6573208b7cf735 /drivers/net/wireless/mediatek/mt7601u
parentrsi: release skb if rsi_prepare_beacon fails (diff)
downloadlinux-15e14f76f85f4f0eab3b8146e1cd3c58ce272823.tar.xz
linux-15e14f76f85f4f0eab3b8146e1cd3c58ce272823.zip
mt7601u: fix bbp version check in mt7601u_wait_bbp_ready
Fix bbp ready check in mt7601u_wait_bbp_ready. The issue is reported by coverity with the following error: Logical vs. bitwise operator The expression's value does not depend on the operands; inadvertent use of the wrong operator is a likely logic error. Addresses-Coverity-ID: 1309441 ("Logical vs. bitwise operator") Fixes: c869f77d6abb ("add mt7601u driver") Acked-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt7601u')
-rw-r--r--drivers/net/wireless/mediatek/mt7601u/phy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt7601u/phy.c b/drivers/net/wireless/mediatek/mt7601u/phy.c
index 06f5702ab4bd..d863ab4a66c9 100644
--- a/drivers/net/wireless/mediatek/mt7601u/phy.c
+++ b/drivers/net/wireless/mediatek/mt7601u/phy.c
@@ -213,7 +213,7 @@ int mt7601u_wait_bbp_ready(struct mt7601u_dev *dev)
do {
val = mt7601u_bbp_rr(dev, MT_BBP_REG_VERSION);
- if (val && ~val)
+ if (val && val != 0xff)
break;
} while (--i);