]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Staging: rtl8712: signedness bug in init
authorDan Carpenter <error27@gmail.com>
Fri, 12 Nov 2010 05:11:13 +0000 (08:11 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Nov 2010 20:25:53 +0000 (12:25 -0800)
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>
drivers/staging/rtl8712/usb_halinit.c

index f6569dce30127c7c5b033f4a2e2b01e17c219938..0e9483bbabe17fb7cab00fc6e2c757a68190c814 100644 (file)
@@ -37,7 +37,7 @@ u8 r8712_usb_hal_bus_init(struct _adapter *padapter)
 {
        u8 val8 = 0;
        u8 ret = _SUCCESS;
-       u8 PollingCnt = 20;
+       int PollingCnt = 20;
        struct registry_priv *pregistrypriv = &padapter->registrypriv;
 
        if (pregistrypriv->chip_version == RTL8712_FPGA) {