diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-11-21 16:37:26 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-22 14:41:22 -0500 |
commit | eb1852b10593dc3ca73e02bf9ac4753a5a464905 (patch) | |
tree | 2416ab37445ec5ec8e669016a2d1f5573863d73c | |
parent | 515db09338704a6ad7d27b5f1e33820d3052edd2 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/rtlwifi/usb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index ad109adcabc..e956fa71d04 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, | |||
108 | pipe = usb_rcvctrlpipe(udev, 0); /* read_in */ | 108 | pipe = usb_rcvctrlpipe(udev, 0); /* read_in */ |
109 | reqtype = REALTEK_USB_VENQT_READ; | 109 | reqtype = REALTEK_USB_VENQT_READ; |
110 | 110 | ||
111 | while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) { | 111 | do { |
112 | status = usb_control_msg(udev, pipe, request, reqtype, value, | 112 | status = usb_control_msg(udev, pipe, request, reqtype, value, |
113 | index, pdata, len, 0); /*max. timeout*/ | 113 | index, pdata, len, 0); /*max. timeout*/ |
114 | if (status < 0) { | 114 | if (status < 0) { |
@@ -119,7 +119,8 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request, | |||
119 | } else { | 119 | } else { |
120 | break; | 120 | break; |
121 | } | 121 | } |
122 | } | 122 | } while (++vendorreq_times < MAX_USBCTRL_VENDORREQ_TIMES); |
123 | |||
123 | if (status < 0 && count++ < 4) | 124 | if (status < 0 && count++ < 4) |
124 | pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n", | 125 | pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n", |
125 | value, status, le32_to_cpu(*(u32 *)pdata)); | 126 | value, status, le32_to_cpu(*(u32 *)pdata)); |