[PATCH] staging: rtl8723bs: os_dep: remove redundant else in rtw_dev_unload

Shyam Sunder Reddy Padira posted 1 patch 1 month, 4 weeks ago
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
[PATCH] staging: rtl8723bs: os_dep: remove redundant else in rtw_dev_unload
Posted by Shyam Sunder Reddy Padira 1 month, 4 weeks ago
Remove the unnecessary else block following a break
statment to simplify the control flow and improve
code readability.

Signed-off-by: Shyam Sunder Reddy Padira <shyamsunderreddypadira@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 29939bf5a156..3207d6d2c727 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -988,12 +988,10 @@ void rtw_dev_unload(struct adapter *padapter)
 			rtw_stop_drv_threads(padapter);
 
 		while (atomic_read(&pcmdpriv->cmdthd_running)) {
-			if (cnt > 5) {
+			if (cnt > 5)
 				break;
-			} else {
-				cnt++;
-				msleep(10);
-			}
+			cnt++;
+			msleep(10);
 		}
 
 		/* check the status of IPS */
-- 
2.43.0
Re: [PATCH] staging: rtl8723bs: os_dep: remove redundant else in rtw_dev_unload
Posted by Luka Gejak 1 month, 3 weeks ago
On Sat Apr 18, 2026 at 7:09 PM CEST, Shyam Sunder Reddy Padira wrote:
> Remove the unnecessary else block following a break
> statment to simplify the control flow and improve
> code readability.
>
> Signed-off-by: Shyam Sunder Reddy Padira <shyamsunderreddypadira@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/os_intfs.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> index 29939bf5a156..3207d6d2c727 100644
> --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> @@ -988,12 +988,10 @@ void rtw_dev_unload(struct adapter *padapter)
>  			rtw_stop_drv_threads(padapter);
>  
>  		while (atomic_read(&pcmdpriv->cmdthd_running)) {
> -			if (cnt > 5) {
> +			if (cnt > 5)
>  				break;
> -			} else {
> -				cnt++;
> -				msleep(10);
> -			}
> +			cnt++;
> +			msleep(10);
>  		}
>  
>  		/* check the status of IPS */

LGTM.

Reviewed-by: Luka Gejak <luka.gejak@linux.dev>

Best regards,
Luka Gejak