Skip to contentSkip to conversation

staging: rt8188eu: Remove dead code

PATCH In review Muhammad Usama Anjum 3 participants 4 messages Jan 28, 2022 – Jan 30, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rt8188eu: Remove dead code

rtStatus is _SUCCESS when the execution reaches this if condition. Remove the dead code.

Fixes 67396d2dfef3 ("staging: r8188eu: merge ODM_ConfigBBWithHeaderFile with its callers")
---
 drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +0 -3
index 0b0690dfb947c..41a0d7f0d29f4 100644
@@ -504,9 +504,6 @@ static	int phy_BB8188E_Config_ParaFile(struct adapter *Adapter)
 		ODM_ReadAndConfig_PHY_REG_PG_8188E(&pHalData->odmpriv);
 	}
 
-	if (rtStatus != _SUCCESS)
-		goto phy_BB8190_Config_ParaFile_Fail;
-
 	/*  3. BB AGC table Initialization */
 	if (HAL_STATUS_FAILURE == ODM_ReadAndConfig_AGC_TAB_1T_8188E(&pHalData->odmpriv))
 		rtStatus = _FAIL;
Signature · 1 line
2.30.2
Acked-by on v1 1/1
#3 lore raw
In reply to Muhammad Usama Anjum

Thus wrote Muhammad Usama Anjum ([email protected]):

Quoted 25 lines

rtStatus is _SUCCESS when the execution reaches this if condition. Remove the dead code.

Fixes 67396d2dfef3 ("staging: r8188eu: merge ODM_ConfigBBWithHeaderFile with its callers")
---
 drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +0 -3
index 0b0690dfb947c..41a0d7f0d29f4 100644
@@ -504,9 +504,6 @@ static	int phy_BB8188E_Config_ParaFile(struct adapter *Adapter)
 		ODM_ReadAndConfig_PHY_REG_PG_8188E(&pHalData->odmpriv);
 	}
 
-	if (rtStatus != _SUCCESS)
-		goto phy_BB8190_Config_ParaFile_Fail;
-
 	/*  3. BB AGC table Initialization */
 	if (HAL_STATUS_FAILURE == ODM_ReadAndConfig_AGC_TAB_1T_8188E(&pHalData->odmpriv))
 		rtStatus = _FAIL;
Signature · 1 line
2.30.2

Thanks for spotting this. It makes sense to remove this duplicate check.

Looking at the function again, the rest of the error handling should be cleaned up as well. I'll send a patch for this.