aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-11-12 00:11:13 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-16 15:25:53 -0500
commit832855354b5863d141ecfc563e78063978c6f29f (patch)
tree4bf9d9552daa9ffc98b3368a95a727b125b0c24f /drivers/staging
parentf36d83a8cb7224f45fdfa1129a616dff56479a09 (diff)
Staging: rtl8712: signedness bug in init
PollingCnt is 20 and that means we loop 20 times and then run the timeout code. After the end of the loop PollingCnt should be -1 but because it's an unsigned char, it's actually 255 and the timeout code never runs. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtl8712/usb_halinit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8712/usb_halinit.c b/drivers/staging/rtl8712/usb_halinit.c
index f6569dce3012..0e9483bbabe1 100644
--- a/drivers/staging/rtl8712/usb_halinit.c
+++ b/drivers/staging/rtl8712/usb_halinit.c
@@ -37,7 +37,7 @@ u8 r8712_usb_hal_bus_init(struct _adapter *padapter)
37{ 37{
38 u8 val8 = 0; 38 u8 val8 = 0;
39 u8 ret = _SUCCESS; 39 u8 ret = _SUCCESS;
40 u8 PollingCnt = 20; 40 int PollingCnt = 20;
41 struct registry_priv *pregistrypriv = &padapter->registrypriv; 41 struct registry_priv *pregistrypriv = &padapter->registrypriv;
42 42
43 if (pregistrypriv->chip_version == RTL8712_FPGA) { 43 if (pregistrypriv->chip_version == RTL8712_FPGA) {