Commit eb1852b1 authored by John W. Linville's avatar John W. Linville

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: default avatarJohn W. Linville <linville@tuxdriver.com>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent 515db093
...@@ -108,7 +108,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request, ...@@ -108,7 +108,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,
pipe = usb_rcvctrlpipe(udev, 0); /* read_in */ pipe = usb_rcvctrlpipe(udev, 0); /* read_in */
reqtype = REALTEK_USB_VENQT_READ; reqtype = REALTEK_USB_VENQT_READ;
while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) { do {
status = usb_control_msg(udev, pipe, request, reqtype, value, status = usb_control_msg(udev, pipe, request, reqtype, value,
index, pdata, len, 0); /*max. timeout*/ index, pdata, len, 0); /*max. timeout*/
if (status < 0) { if (status < 0) {
...@@ -119,7 +119,8 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request, ...@@ -119,7 +119,8 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,
} else { } else {
break; break;
} }
} } while (++vendorreq_times < MAX_USBCTRL_VENDORREQ_TIMES);
if (status < 0 && count++ < 4) if (status < 0 && count++ < 4)
pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n", pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n",
value, status, le32_to_cpu(*(u32 *)pdata)); value, status, le32_to_cpu(*(u32 *)pdata));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment