From: Jules Debbaut <julesdebbaut@icloud.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, Jules Debbaut <julesdebbaut@icloud.com>
Subject: [PATCH 2/5] staging: rtl8723bs: add braces to else-if arms
Date: Tue, 2 Jun 2026 23:04:04 +0200 [thread overview]
Message-ID: <20260602210407.4364-2-julesdebbaut@icloud.com> (raw)
In-Reply-To: <20260602210407.4364-1-julesdebbaut@icloud.com>
Add braces to else-if arms in rtw_parse_wpa_ie() and
rtw_parse_wpa2_ie() where the corresponding if block uses
braces, as required by kernel coding style and flagged by
checkpatch.
Signed-off-by: Jules Debbaut <julesdebbaut@icloud.com>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index 4db605aa2..f5a6f6e1c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -471,8 +471,9 @@ int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
pos += WPA_SELECTOR_LEN;
left -= WPA_SELECTOR_LEN;
- } else if (left > 0)
+ } else if (left > 0) {
return _FAIL;
+ }
/* pairwise_cipher */
if (left >= 2) {
@@ -491,8 +492,9 @@ int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
left -= WPA_SELECTOR_LEN;
}
- } else if (left == 1)
+ } else if (left == 1) {
return _FAIL;
+ }
if (is_8021x) {
if (left >= 6) {
@@ -531,8 +533,9 @@ int rtw_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
pos += RSN_SELECTOR_LEN;
left -= RSN_SELECTOR_LEN;
- } else if (left > 0)
+ } else if (left > 0) {
return _FAIL;
+ }
/* pairwise_cipher */
if (left >= 2) {
@@ -551,8 +554,9 @@ int rtw_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
left -= RSN_SELECTOR_LEN;
}
- } else if (left == 1)
+ } else if (left == 1) {
return _FAIL;
+ }
if (is_8021x) {
if (left >= 6) {
--
2.53.0
next prev parent reply other threads:[~2026-06-02 21:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 21:04 [PATCH 1/5] staging: rtl8723bs: remove unnecessary parentheses Jules Debbaut
2026-06-02 21:04 ` Jules Debbaut [this message]
2026-06-02 21:04 ` [PATCH 3/5] staging: rtl8723bs: fix alignment of continuation lines Jules Debbaut
2026-06-02 21:04 ` [PATCH 4/5] staging: rtl8723bs: rewrap long comments and remove dead code Jules Debbaut
2026-06-02 21:04 ` [PATCH 5/5] staging: rtl8723bs: fix lines exceeding 100 columns Jules Debbaut
2026-07-07 11:04 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260602210407.4364-2-julesdebbaut@icloud.com \
--to=julesdebbaut@icloud.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox