Re: [PATCH 4/4] Staging: rtl8723bs: fix else after break warning

From: Dan Carpenter
Date: Mon Jan 29 2024 - 10:08:54 EST


On Mon, Jan 29, 2024 at 04:18:56PM +0200, Meir Elisha wrote:
> Fix checkpatch warning: else is not generally useful after a break or return
>
> Signed-off-by: Meir Elisha <meir6264@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 38 +++++++++--------------
> 1 file changed, 14 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index 044483f3d678..efaac84f22b4 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -1540,30 +1540,23 @@ void _rtw_join_timeout_handler(struct timer_list *t)
>
> spin_lock_bh(&pmlmepriv->lock);
>
> - if (rtw_to_roam(adapter) > 0) { /* join timeout caused by roaming */
> + if (rtw_to_roam(adapter) == 0) { /* join timeout caused by roaming */

The comment is wrong now.

regards,
dan carpenter