Commit 19b662ae authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Kleber Sacilotto de Souza

mt7601u: fix bbp version check in mt7601u_wait_bbp_ready

BugLink: https://bugs.launchpad.net/bugs/1864773

commit 15e14f76 upstream.

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: c869f77d ("add mt7601u driver")
Acked-by: default avatarJakub Kicinski <kubakici@wp.pl>
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent e1016978
...@@ -219,7 +219,7 @@ int mt7601u_wait_bbp_ready(struct mt7601u_dev *dev) ...@@ -219,7 +219,7 @@ int mt7601u_wait_bbp_ready(struct mt7601u_dev *dev)
do { do {
val = mt7601u_bbp_rr(dev, MT_BBP_REG_VERSION); val = mt7601u_bbp_rr(dev, MT_BBP_REG_VERSION);
if (val && ~val) if (val && val != 0xff)
break; break;
} while (--i); } while (--i);
......
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