linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: core: merge the if conditions
@ 2021-10-09  5:06 Saurav Girepunje
  0 siblings, 0 replies; only message in thread
From: Saurav Girepunje @ 2021-10-09  5:06 UTC (permalink / raw)
  To: gregkh, fabioaiuto83, ross.schm.dev, fmdefrancesco,
	zhansayabagdaulet, linux-staging, linux-kernel
  Cc: saurav.girepunje

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-09  5:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-09  5:06 [PATCH] staging: rtl8723bs: core: merge the if conditions Saurav Girepunje

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).