[PATCH] staging: rtl8723bs: core: merge the if conditions

Saurav Girepunje
2021-10-09T05:08:51Z

merge the two consecutive if conditions in rtw_set_rpwm().
Both are having same condition to check.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index a392d5b4caf2..5292f90251e0 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -272,11 +272,11 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
pwrpriv->rpwm = pslv;

cpwm_orig = 0;
- if (rpwm & PS_ACK)
+ if (rpwm & PS_ACK) {
rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_orig);
-
- if (rpwm & PS_ACK)
_set_timer(&pwrpriv->pwr_rpwm_timer, LPS_RPWM_WAIT_MS);
+ }
+
rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&rpwm));

pwrpriv->tog += 0x80;
--
2.32.0