rtlwifi: Fix smatch warnings in usb.c
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 25 Sep 2013 17:57:47 +0000 (12:57 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 3 Oct 2013 20:24:29 +0000 (16:24 -0400)
commit354d0f3c40fb40193213e40f3177ff528798ca8d
treec7282a68c564af52b84be469bd297543bc613e26
parenta3557d4d485322ebc60ca7f11616695c5dd69383
rtlwifi: Fix smatch warnings in usb.c

Smatch displays the following:
  CHECK   drivers/net/wireless/rtlwifi/usb.c
drivers/net/wireless/rtlwifi/usb.c:458 _rtl_usb_rx_process_agg() warn: assigning (-98) to unsigned variable 'stats.noise'
drivers/net/wireless/rtlwifi/usb.c:503 _rtl_usb_rx_process_noagg() warn: assigning (-98) to unsigned variable 'stats.noise'
drivers/net/wireless/rtlwifi/usb.c:596 _rtl_rx_get_padding() info: ignoring unreachable code.
drivers/net/wireless/rtlwifi/usb.c:596 _rtl_rx_get_padding() info: ignoring unreachable code.

The variable 'stats.noise' is not used, thus the initializers are removed.
The unreachable code info is fixed by including the appropriate section inside
#ifdef .. #endif constructions.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/usb.c