]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8723bs: remove a couple of redundant initializations
authorColin Ian King <colin.king@canonical.com>
Fri, 26 Jan 2018 11:54:14 +0000 (11:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jan 2018 14:08:43 +0000 (15:08 +0100)
The initialization of PwrCfgCmd is redundant as the value is never read
and it is being re-assigned to PwrSeqCmd[AryIdx] inside a loop, hence
it can be removed.  Also, the initialization of ie_ptr is redundant as
the value is never read and it is being re-assigned in either path of
an if statement, hence it can be removed too.

Cleans up clang warnings:
drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c:53:15: warning: Value
stored to 'PwrCfgCmd' during its initialization is never read
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:374:7: warning: Value
stored to 'ie_ptr' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c

index f4619768a99fbe5e679da61a54005e29d9d89816..334d680b9b1cddf5c7170b481f5616bdee6e34fa 100644 (file)
@@ -50,7 +50,7 @@ u8 HalPwrSeqCmdParsing(
        WLAN_PWR_CFG PwrSeqCmd[]
 )
 {
-       WLAN_PWR_CFG PwrCfgCmd = {0};
+       WLAN_PWR_CFG PwrCfgCmd;
        u8 bPollingBit = false;
        u32 AryIdx = 0;
        u8 value = 0;
index da59496f6e04bb48386f3337503728f977e4797c..cc18d0ad7d7b32ea2eab4bc2c04596e58f436161 100644 (file)
@@ -371,7 +371,7 @@ static char *translate_scan(struct adapter *padapter,
                u8 *wpsie_ptr = NULL;
                uint wps_ielen = 0;
 
-               u8 *ie_ptr = pnetwork->network.IEs + ie_offset;
+               u8 *ie_ptr;
                total_ielen = pnetwork->network.IELength - ie_offset;
 
                if (pnetwork->network.Reserved[0] == 2) { /*  Probe Request */