OSDN Git Service

staging: rtl8723bs: Combine if statements with equivalent body.
authorQuytelda Kahja <quytelda@tamalin.org>
Sun, 17 Jun 2018 05:30:33 +0000 (22:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 13:03:16 +0000 (22:03 +0900)
Two if statements that carry out the same operation can be combined with
a logical OR.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c

index 7e27d7f..5d44aee 100644 (file)
@@ -1734,12 +1734,8 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel,
 
        /*  workaround for wrong index combination to obtain tx power limit, */
        /*  OFDM only exists in BW 20M */
-       if (idx_rate_sctn == 1)
-               idx_bandwidth = 0;
-
-       /*  workaround for wrong index combination to obtain tx power limit, */
        /*  CCK table will only be given in BW 20M */
-       if (idx_rate_sctn == 0)
+       if (idx_rate_sctn == 0 || idx_rate_sctn == 1)
                idx_bandwidth = 0;
 
        /*  workaround for wrong indxe combination to obtain tx power limit, */