drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 --- 1 file changed, 3 deletions(-)
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 <usama.anjum@collabora.com>
---
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
index 0b0690dfb947c..41a0d7f0d29f4 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
@@ -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;
--
2.30.2
On Fri, Jan 28, 2022 at 04:19:54PM +0500, Muhammad Usama Anjum wrote:
> 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 <usama.anjum@collabora.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
What checker warned about this?
regards,
dan carpenter
On 1/28/22 4:23 PM, Dan Carpenter wrote:
> On Fri, Jan 28, 2022 at 04:19:54PM +0500, Muhammad Usama Anjum wrote:
>> 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 <usama.anjum@collabora.com>
>
> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> What checker warned about this?
Coverity
Thus wrote Muhammad Usama Anjum (usama.anjum@collabora.com):
> 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 <usama.anjum@collabora.com>
> ---
> drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 ---
> 1 file changed, 3 deletions(-)
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
> index 0b0690dfb947c..41a0d7f0d29f4 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
> @@ -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;
> --
> 2.30.2
Thanks for spotting this. It makes sense to remove this duplicate check.
Acked-by: Martin Kaiser <martin@kaiser.cx>
Looking at the function again, the rest of the error handling should be
cleaned up as well. I'll send a patch for this.
© 2016 - 2026 Red Hat, Inc.