Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtlwifi: squash warning in _usb_read_sync

drivers/net/wireless/rtlwifi/usb.c: In function ‘_usb_read_sync’:
drivers/net/wireless/rtlwifi/usb.c:102:6: warning: ‘status’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/usb.c:102:6: note: ‘status’ was declared here

My compiler is dumb, but better to eliminate the warning than to have
anyone waste time evaluating this again...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

+3 -2
+3 -2
drivers/net/wireless/rtlwifi/usb.c
··· 108 108 pipe = usb_rcvctrlpipe(udev, 0); /* read_in */ 109 109 reqtype = REALTEK_USB_VENQT_READ; 110 110 111 - while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) { 111 + do { 112 112 status = usb_control_msg(udev, pipe, request, reqtype, value, 113 113 index, pdata, len, 0); /*max. timeout*/ 114 114 if (status < 0) { ··· 119 119 } else { 120 120 break; 121 121 } 122 - } 122 + } while (++vendorreq_times < MAX_USBCTRL_VENDORREQ_TIMES); 123 + 123 124 if (status < 0 && count++ < 4) 124 125 pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n", 125 126 value, status, le32_to_cpu(*(u32 *)pdata));