Skip to contentSkip to conversation

staging: rtl8723bs: core: avoid unnecessary if condition

PATCH New Saurav Girepunje 1 participant 1 message Nov 7, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: core: avoid unnecessary if condition

In function rtw_lps_change_dtim_hdl remove the if condition check to compare the pwrpriv->dtim to dtim . If both are not equal dtim is getting assign to pwrpriv->dtim. But if both are equal assigning dtim to pwrpriv->dtim will not make any difference on value. So remove the unnecessary if condition check.

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -2
index 639459d52261..bddfc02fb73e 100644
@@ -1498,8 +1498,7 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim)
 
 	mutex_lock(&pwrpriv->lock);
 
-	if (pwrpriv->dtim != dtim)
-		pwrpriv->dtim = dtim;
+	pwrpriv->dtim = dtim;
 
 	if (pwrpriv->fw_current_in_ps_mode && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
 		u8 ps_mode = pwrpriv->pwr_mode;

--
2.33.0