]> www.infradead.org Git - users/hch/misc.git/commitdiff
staging: rtl8723bs: clean up variable initializations
authorMichael Straube <straube.linux@gmail.com>
Sat, 23 Aug 2025 12:43:19 +0000 (14:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:54:58 +0000 (15:54 +0200)
After previous cleanup patches the variable initializations in
hal_EfuseSwitchToBank are messed up a little, but were left as-is to make
reviewing easier. For example bRet is initialized to false and immediately
set to true. This patch cleans up the variable initializations.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20250823124321.485910-13-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c

index 014d94894de91e9040ef01bf627d6de9316f7d01..ab30d259882507190efc72dd46916b752f868488 100644 (file)
@@ -448,11 +448,9 @@ static u8 hal_EfuseSwitchToBank(
        struct adapter *padapter, u8 bank
 )
 {
-       u8 bRet = false;
-       u32 value32 = 0;
+       u8 bRet = true;
+       u32 value32 = rtw_read32(padapter, EFUSE_TEST);
 
-       value32 = rtw_read32(padapter, EFUSE_TEST);
-       bRet = true;
        switch (bank) {
        case 0:
                value32 = (value32 & ~EFUSE_SEL_MASK) | EFUSE_SEL(EFUSE_WIFI_SEL_0);