* [PATCH] rt2860: test off by one in RtmpAsicSendCommandToMcu()
@ 2009-12-26 19:00 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-12-26 19:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andrew Morton, LKML, bzolnier
`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>
---
drivers/staging/rt2860/common/rtmp_mcu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c
index 9f03901..e80f587 100644
--- a/drivers/staging/rt2860/common/rtmp_mcu.c
+++ b/drivers/staging/rt2860/common/rtmp_mcu.c
@@ -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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-26 18:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-26 19:00 [PATCH] rt2860: test off by one in RtmpAsicSendCommandToMcu() Roel Kluin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox