staging: rtl8712: remove redundant initialization to 'rfPath'
authorColin Ian King <colin.king@canonical.com>
Sat, 20 Jan 2018 22:31:06 +0000 (22:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jan 2018 10:48:05 +0000 (11:48 +0100)
The value stored to rfPath during initialization is never read, the
following switch statement re-assigns it a new value on all the
case and default paths. Hence the initialization is redundant and
can be removed.

Cleans up clang warning:
drivers/staging/rtl8712/rtl871x_mp.c:544:5: warning: Value stored to
'rfPath' 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/rtl8712/rtl871x_mp.c

index 3c10a2c848c8f577fc9a8dce5edc5e29e152042f..ba208a2e1e4ee48d33e13a9ca7261b5098aaa16b 100644 (file)
@@ -541,7 +541,7 @@ void r8712_SetSingleCarrierTx(struct _adapter *pAdapter, u8 bStart)
 
 void r8712_SetSingleToneTx(struct _adapter *pAdapter, u8 bStart)
 {
-       u8 rfPath = pAdapter->mppriv.curr_rfpath;
+       u8 rfPath;
 
        switch (pAdapter->mppriv.antenna_tx) {
        case ANTENNA_B: