• Larry Finger's avatar
    rtlwifi: rtl8192_common: Fix smatch errors and warnings in rtl8192c/dm_common.c · d0df71dc
    Larry Finger authored
    Smatch lists the following:
      CHECK   drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
    drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:551 rtl92c_dm_pwdb_monitor() info: ignoring unreachable code.
    drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:551 rtl92c_dm_pwdb_monitor() info: ignoring unreachable code.
    drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:870 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2
    drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:870 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2
    drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:882 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2
    drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:883 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2
    drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:891 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2
    drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:892 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2
    
    The unreachable code message is fixed by deleting the code that follows a return.
    
    The errors are fixed by increasing the size of txpwr_level.
    Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    d0df71dc
dm_common.c 50.1 KB