summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-11-21 16:37:26 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-22 14:41:22 -0500
commiteb1852b10593dc3ca73e02bf9ac4753a5a464905 (patch)
tree2416ab37445ec5ec8e669016a2d1f5573863d73c /drivers/net
parent515db09338704a6ad7d27b5f1e33820d3052edd2 (diff)
downloadtalos-obmc-linux-eb1852b10593dc3ca73e02bf9ac4753a5a464905.tar.gz
talos-obmc-linux-eb1852b10593dc3ca73e02bf9ac4753a5a464905.zip
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index ad109adcabcb..e956fa71d040 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -108,7 +108,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,
pipe = usb_rcvctrlpipe(udev, 0); /* read_in */
reqtype = REALTEK_USB_VENQT_READ;
- while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) {
+ do {
status = usb_control_msg(udev, pipe, request, reqtype, value,
index, pdata, len, 0); /*max. timeout*/
if (status < 0) {
@@ -119,7 +119,8 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,
} else {
break;
}
- }
+ } while (++vendorreq_times < MAX_USBCTRL_VENDORREQ_TIMES);
+
if (status < 0 && count++ < 4)
pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n",
value, status, le32_to_cpu(*(u32 *)pdata));
OpenPOWER on IntegriCloud