lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 2 Feb 2024 11:00:27 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Meir Elisha <meir6264@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Hans de Goede <hdegoede@...hat.com>,
	Ruan Jinjie <ruanjinjie@...wei.com>,
	Yang Yingliang <yangyingliang@...wei.com>,
	linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] Staging: rtl8723bs: fix else after break warning

On Thu, Feb 01, 2024 at 04:04:59PM +0200, Meir Elisha wrote:
> Fix checkpatch warning:
> else is not generally useful after a break or return
> 

This commit message doesn't work.  It needs to explain why you didn't
just delete the else statement and pull the code in tab.  And, honestly,
that's what you should have done...

regards,
dan carpenter

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index b221913733fb..c99fa5f1716a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1552,10 +1552,9 @@ void _rtw_join_timeout_handler(struct timer_list *t)
 					continue;
 				}
 				break;
-			} else {
-				rtw_indicate_disconnect(adapter);
-				break;
 			}
+			rtw_indicate_disconnect(adapter);
+			break;
 		}
 
 	} else {
@@ -2103,12 +2102,12 @@ signed int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, u
 	}
 
 	iEntry = SecIsInPMKIDList(adapter, pmlmepriv->assoc_bssid);
-	if (iEntry < 0) {
+	if (iEntry < 0)
 		return ielength;
-	} else {
-		if (authmode == WLAN_EID_RSN)
-			ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
-	}
+
+	if (authmode == WLAN_EID_RSN)
+		ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
+
 	return ielength;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ