diff options
author | Nicolas Iooss <nicolas.iooss_linux@m4x.org> | 2017-12-10 20:51:59 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-12-14 14:43:58 +0200 |
commit | e4779162f7377baa9fb9a044555ecaae22c3f125 (patch) | |
tree | c29068135b9cec6a8ceceb7e62d10d7570a782ba /drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | |
parent | b7573a0a27bfa8270dea9b145448f6884b7cacc1 (diff) | |
download | linux-e4779162f7377baa9fb9a044555ecaae22c3f125.tar.bz2 |
rtlwifi: always initialize variables given to RT_TRACE()
In rtl_rx_ampdu_apply(), when rtlpriv->cfg->ops->get_btc_status()
returns false, RT_TRACE() is called with the values of variables
reject_agg and agg_size, which have not been initialized.
Always initialize these variables in order to prevent using
uninitialized values.
This issue has been found with clang. The compiler reported:
drivers/net/wireless/realtek/rtlwifi/base.c:1665:6: error: variable
'agg_size' is used uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
if (rtlpriv->cfg->ops->get_btc_status())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/realtek/rtlwifi/base.c:1671:31: note:
uninitialized use occurs here
reject_agg, ctrl_agg_size, agg_size);
^~~~~~~~
drivers/net/wireless/realtek/rtlwifi/base.c:1665:6: error: variable
'reject_agg' is used uninitialized whenever 'if' condition
is false [-Werror,-Wsometimes-uninitialized]
if (rtlpriv->cfg->ops->get_btc_status())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/realtek/rtlwifi/base.c:1671:4: note:
uninitialized use occurs here
reject_agg, ctrl_agg_size, agg_size);
^~~~~~~~~~
Fixes: 2635664e6e4a ("rtlwifi: Add rx ampdu cfg for btcoexist.")
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/time-event.c')
0 files changed, 0 insertions, 0 deletions