From: <gregkh@suse.de>
To: roel.kluin@gmail.com, akpm@linux-foundation.org, gregkh@suse.de,
linux-kernel@vger.kernel.org
Subject: patch staging-rtlxxxx-off-by-one-in-asicsendcommandtomcu-and-ndis_status-nicloadfirmware.patch added to gregkh-2.6 tree
Date: Tue, 02 Jun 2009 12:43:06 -0700 [thread overview]
Message-ID: <12439717863001@kroah.org> (raw)
In-Reply-To: <4A0B1382.6040501@gmail.com>
This is a note to let you know that I've just added the patch titled
Subject: staging: rtlxxxx: off by one in AsicSendCommandToMcu() and NDIS_STATUS NICLoadFirmware()
to my gregkh-2.6 tree. Its filename is
staging-rtlxxxx-off-by-one-in-asicsendcommandtomcu-and-ndis_status-nicloadfirmware.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From roel.kluin@gmail.com Tue Jun 2 12:06:10 2009
From: Roel Kluin <roel.kluin@gmail.com>
Date: Wed, 13 May 2009 20:37:54 +0200
Subject: staging: rtlxxxx: off by one in AsicSendCommandToMcu() and NDIS_STATUS NICLoadFirmware()
To: Greg KH <gregkh@suse.de>
Cc: lkml <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@linux-foundation.org>
Message-ID: <4A0B1382.6040501@gmail.com>
With a postfix increment i/Index is incremented beyond 100/1000 so the
message will be displayed too soon.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rt2860/common/mlme.c | 2 +-
drivers/staging/rt2860/common/rtmp_init.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/staging/rt2860/common/mlme.c
+++ b/drivers/staging/rt2860/common/mlme.c
@@ -7866,7 +7866,7 @@ BOOLEAN AsicSendCommandToMcu(
RTMPusecDelay(2);
} while(i++ < 100);
- if (i >= 100)
+ if (i > 100)
{
{
#ifdef RT2860
--- a/drivers/staging/rt2860/common/rtmp_init.c
+++ b/drivers/staging/rt2860/common/rtmp_init.c
@@ -3366,7 +3366,7 @@ NDIS_STATUS NICLoadFirmware(
RTMPusecDelay(1000);
} while (Index++ < 1000);
- if (Index >= 1000)
+ if (Index > 1000)
{
Status = NDIS_STATUS_FAILURE;
DBGPRINT(RT_DEBUG_ERROR, ("NICLoadFirmware: MCU is not ready\n\n\n"));
prev parent reply other threads:[~2009-06-02 19:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-13 18:37 [PATCH] staging: off by one in AsicSendCommandToMcu() and NDIS_STATUS NICLoadFirmware() Roel Kluin
2009-06-02 19:43 ` gregkh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12439717863001@kroah.org \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.