Skip to content

Commit

Permalink
Staging: rtl8712: signedness bug in init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Nov 16, 2010
1 parent f36d83a commit 8328553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8712/usb_halinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8328553

Please sign in to comment.