Skip to contentSkip to conversation

Staging: rtl8188eu: Remove redundant if condition

PATCH New Vatika Harlalka 1 participant 1 message Feb 26, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Staging: rtl8188eu: Remove redundant if condition

Remove redundant if condition as !result is always false.

---

Changes in v4: Added "Staging: rtl8188eu" to commit message. Changes in v3: Removed unneeded newline after if condition to
follow kernel coding conventions.
Changes in v2: Removed {} around the outer if condition as
it has single statement.

 drivers/staging/rtl8188eu/hal/phy.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/staging/rtl8188eu/hal/phy.c +2 -8
index a91bc6d..a708ff9 100644
@@ -361,7 +361,6 @@ void phy_sw_chnl(struct adapter *adapt, u8 channel)
 {
 	struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
 	u8 tmpchannel = hal_data->CurrentChannel;
-	bool  result = true;
 
 	if (hal_data->rf_chip == RF_PSEUDO_11N)
 		return;
@@ -371,15 +370,10 @@ void phy_sw_chnl(struct adapter *adapt, u8 channel)
 
 	hal_data->CurrentChannel = channel;
 
-	if ((!adapt->bDriverStopped) && (!adapt->bSurpriseRemoved)) {
+	if ((!adapt->bDriverStopped) && (!adapt->bSurpriseRemoved))
 		phy_sw_chnl_callback(adapt, channel);
-
-		if (!result)
-			hal_data->CurrentChannel = tmpchannel;
-
-	} else {
+	else
 		hal_data->CurrentChannel = tmpchannel;
-	}
 }
 
 #define ODM_TXPWRTRACK_MAX_IDX_88E  6
Signature · 1 line
1.9.1