summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorQuytelda Kahja <quytelda@tamalin.org>2018-06-16 22:30:38 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-28 22:03:16 +0900
commitf5746848212021db200ad6a24d394cbadf4f17cf (patch)
tree2d383e0b508f6db3992b3497e59676560c60b89a /drivers/staging
parent871081d4e95778120b7dbe150b627a6b854e3141 (diff)
staging: rtl8723bs: Merge conditionals with similar bodies.
Two conditionals that set 'channel' based on 'band_type' in 'phy_get_tx_pwr_lmt()' can be simplified into one single-line conditional. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtl8723bs/hal/hal_com_phycfg.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index dd097df86fa3..9e6dc238c028 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -1738,12 +1738,8 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel,
idx_bandwidth = 1;
}
- if (band_type == BAND_ON_2_4G)
- channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_2_4G,
- channel);
- else if (band_type == BAND_ON_5G)
- channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G,
- channel);
+ if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G)
+ channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel);
if (idx_band == -1 || idx_regulation == -1 || idx_bandwidth == -1 ||
idx_rate_sctn == -1 || idx_channel == -1) {