staging: rtlwifi: shut up -Wmaybe-uninitialized warning
authorArnd Bergmann <arnd@arndb.de>
Wed, 23 Aug 2017 13:22:51 +0000 (15:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2017 23:26:10 +0000 (16:26 -0700)
commita084cda42ece32c83c190db0681f4675d9c41021
treeade3cf8d9ee1ef51e13c4b6a5488f8c1d4c7ae22
parente4f857f739fbd15fd36f10e7caab95779c1dc1e4
staging: rtlwifi: shut up -Wmaybe-uninitialized warning

This function contains a series of interdependent conditions,
slightly more than gcc can follow handle apparently:

drivers/staging/rtlwifi/base.c: In function 'rtl_check_beacon_key':
drivers/staging/rtlwifi/base.c:2546:34: error: 'ht_cap_ie' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This moves the code around a bit, to simplify the conditions
enough that gcc can see that all variables are correctly
initialized.

Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/base.c