Skip to content

Commit

Permalink
Staging: rt2860: test off by one in RtmpAsicSendCommandToMcu()
Browse files Browse the repository at this point in the history
`i' reaches 101 after the loop, so if it was 100 then it succeeded in
the last iteration. This is probably unlikely to cause problems.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roel Kluin authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 716323c commit 23a51a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/rt2860/common/rtmp_mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd,
("AsicSendCommanToMcu::Mail box is busy\n"));
} while (i++ < 100);

if (i >= 100) {
if (i > 100) {
DBGPRINT_ERR(("H2M_MAILBOX still hold by MCU. command fail\n"));
return FALSE;
}
Expand Down

0 comments on commit 23a51a8

Please sign in to comment.