1
0
Fork 0

mt7601u: fix bbp version check in mt7601u_wait_bbp_ready

commit 15e14f76f8 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: c869f77d6a ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Lorenzo Bianconi 2019-09-21 10:44:01 +02:00 committed by Greg Kroah-Hartman
parent 1de9dd61f0
commit 2bc814d98e
1 changed files with 1 additions and 1 deletions

View File

@ -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);