]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: mvm: Change an 'else if' into an 'else' in iwl_mvm_send_add_bcast_sta
authorNathan Chancellor <natechancellor@gmail.com>
Fri, 8 Mar 2019 00:03:22 +0000 (17:03 -0700)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 19 Apr 2019 07:27:33 +0000 (10:27 +0300)
commitcd56cf205564574afcab88125a908f1baf19016e
tree22d06a58e59628754a1d524389a89da8771a8707
parent1d94361d78c89c4340540e46bed7b853decc12fa
iwlwifi: mvm: Change an 'else if' into an 'else' in iwl_mvm_send_add_bcast_sta

When building with -Wsometimes-uninitialized, Clang warns:

drivers/net/wireless/intel/iwlwifi/mvm/sta.c:2114:12: warning: variable
'queue' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]

Clang can't evaluate at this point that WARN(1, ...) always returns true
because __ret_warn_on is defined as !!(condition), which isn't
immediately evaluated as 1. Change this branch to else so that it's
clear to Clang that we intend to bail out here.

Link: https://github.com/ClangBuiltLinux/linux/issues/399
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
[added a few more braces]
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/sta.c