Staging: rt2860: test off by one in RtmpAsicSendCommandToMcu()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Sunday, March 7, 2010 - 6:00 pm

Gitweb:     http://git.kernel.org/linus/23a51a8061567a47347ade59edf2a0bde0eece30
Commit:     23a51a8061567a47347ade59edf2a0bde0eece30
Parent:     716323c09319ae5e6c9e413a6378d61a77b26996
Author:     Roel Kluin <roel.kluin@gmail.com>
AuthorDate: Sat Dec 26 20:00:47 2009 +0100
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Wed Mar 3 16:42:34 2010 -0800

    Staging: rt2860: test off by one in RtmpAsicSendCommandToMcu()
    
    `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>
---
 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;
 		}
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Staging: rt2860: test off by one in RtmpAsicSendCommandToMcu(), Linux Kernel Mailing ..., (Sun Mar 7, 6:00 pm)