* [patch] rtlwifi: potential forever loop in rtl92de_hw_init()
@ 2011-06-29 6:31 Dan Carpenter
2011-06-29 13:46 ` Larry Finger
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-06-29 6:31 UTC (permalink / raw)
To: Larry Finger
Cc: Chaoming Li, John W. Linville, open list:RTL8192CE WIRELES...,
kernel-janitors
"i" should be an int here because we are trying to use it to count
to 10000. The original code looks like it could hang in a forever
loop.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
If we exit the loop via a timeout, that error isn't handled. Should
we limp along, or return an error?
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
index eedfb38..cbc0f40 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
@@ -908,7 +908,8 @@ int rtl92de_hw_init(struct ieee80211_hw *hw)
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
bool rtstatus = true;
- u8 tmp_u1b, i;
+ u8 tmp_u1b;
+ int i;
int err;
unsigned long flags;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] rtlwifi: potential forever loop in rtl92de_hw_init()
2011-06-29 6:31 [patch] rtlwifi: potential forever loop in rtl92de_hw_init() Dan Carpenter
@ 2011-06-29 13:46 ` Larry Finger
0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2011-06-29 13:46 UTC (permalink / raw)
To: Dan Carpenter
Cc: Chaoming Li, John W. Linville, open list:RTL8192CE WIRELES...,
kernel-janitors
On 06/29/2011 01:31 AM, Dan Carpenter wrote:
> "i" should be an int here because we are trying to use it to count
> to 10000. The original code looks like it could hang in a forever
> loop.
>
> Signed-off-by: Dan Carpenter<error27@gmail.com>
> ---
> If we exit the loop via a timeout, that error isn't handled. Should
> we limp along, or return an error?
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Dan,
Thanks for this part. After another look at this routine, there are a couple of
places that need to be fixed. I will take care of that.
Larry
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> index eedfb38..cbc0f40 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> @@ -908,7 +908,8 @@ int rtl92de_hw_init(struct ieee80211_hw *hw)
> struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
> bool rtstatus = true;
> - u8 tmp_u1b, i;
> + u8 tmp_u1b;
> + int i;
> int err;
> unsigned long flags;
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-29 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 6:31 [patch] rtlwifi: potential forever loop in rtl92de_hw_init() Dan Carpenter
2011-06-29 13:46 ` Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).