staging: rt8188eu: Remove dead code
Subsystems (2)
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")
Signed-off-by Muhammad Usama Anjum <[email protected]>
--- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +0 -3
@@ -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
Quoted 5 lines · Muhammad Usama Anjum
rtStatus is
_SUCCESSwhen the execution reaches this if condition. Remove the dead code.Fixes 67396d2dfef3 ("staging: r8188eu: merge ODM_ConfigBBWithHeaderFile with its callers")Signed-off-by Muhammad Usama Anjum <[email protected]>
Reviewed-by Dan Carpenter <[email protected]>
What checker warned about this?
regards,
dan carpenter
Quoted 10 lines · Dan Carpenter
Quoted 5 lines · Muhammad Usama Anjum
rtStatus is
_SUCCESSwhen the execution reaches this if condition. Remove the dead code.Fixes 67396d2dfef3 ("staging: r8188eu: merge ODM_ConfigBBWithHeaderFile with its callers")Signed-off-by Muhammad Usama Anjum <[email protected]>Reviewed-by Dan Carpenter <[email protected]>What checker warned about this?
Coverity
Thus wrote Muhammad Usama Anjum ([email protected]):
Quoted 25 lines
rtStatus is
_SUCCESSwhen the execution reaches this if condition. Remove the dead code.Fixes 67396d2dfef3 ("staging: r8188eu: merge ODM_ConfigBBWithHeaderFile with its callers")Signed-off-by Muhammad Usama Anjum <[email protected]>--- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 --- 1 file changed, 3 deletions(-)drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +0
-3@@ -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.
Acked-by Martin Kaiser <[email protected]>
Looking at the function again, the rest of the error handling should be cleaned up as well. I'll send a patch for this.