* [PATCH] staging: rt8188eu: Remove dead code
@ 2022-01-28 11:19 Muhammad Usama Anjum
2022-01-28 11:23 ` Dan Carpenter
2022-01-30 17:54 ` Martin Kaiser
0 siblings, 2 replies; 4+ messages in thread
From: Muhammad Usama Anjum @ 2022-01-28 11:19 UTC (permalink / raw)
To: Larry Finger, Phillip Potter, Greg Kroah-Hartman, Martin Kaiser
Cc: Muhammad Usama Anjum, kernel, kernel-janitors, linux-staging,
linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rt8188eu: Remove dead code
2022-01-28 11:19 [PATCH] staging: rt8188eu: Remove dead code Muhammad Usama Anjum
@ 2022-01-28 11:23 ` Dan Carpenter
2022-01-28 11:24 ` Muhammad Usama Anjum
2022-01-30 17:54 ` Martin Kaiser
1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2022-01-28 11:23 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, Martin Kaiser,
kernel, kernel-janitors, linux-staging, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rt8188eu: Remove dead code
2022-01-28 11:23 ` Dan Carpenter
@ 2022-01-28 11:24 ` Muhammad Usama Anjum
0 siblings, 0 replies; 4+ messages in thread
From: Muhammad Usama Anjum @ 2022-01-28 11:24 UTC (permalink / raw)
To: Dan Carpenter
Cc: usama.anjum, Larry Finger, Phillip Potter, Greg Kroah-Hartman,
Martin Kaiser, kernel, kernel-janitors, linux-staging,
linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rt8188eu: Remove dead code
2022-01-28 11:19 [PATCH] staging: rt8188eu: Remove dead code Muhammad Usama Anjum
2022-01-28 11:23 ` Dan Carpenter
@ 2022-01-30 17:54 ` Martin Kaiser
1 sibling, 0 replies; 4+ messages in thread
From: Martin Kaiser @ 2022-01-30 17:54 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, kernel,
kernel-janitors, linux-staging, linux-kernel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-30 17:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-28 11:19 [PATCH] staging: rt8188eu: Remove dead code Muhammad Usama Anjum
2022-01-28 11:23 ` Dan Carpenter
2022-01-28 11:24 ` Muhammad Usama Anjum
2022-01-30 17:54 ` Martin Kaiser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox