From: Hungyu Lin <dennylin0707@gmail.com>
To: gregkh@linuxfoundation.org
Cc: error27@gmail.com, khomenkov@mailbox.org,
khushalchitturi@gmail.com, s9430939@naver.com,
nikolayof23@gmail.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH 1/5] staging: rtl8723bs: remove redundant return variable in rtw_make_wlanhdr()
Date: Mon, 13 Jul 2026 07:05:33 +0000 [thread overview]
Message-ID: <20260713070537.15903-2-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260713070537.15903-1-dennylin0707@gmail.com>
The temporary return variable is no longer needed because the only
error path returns directly. Remove the redundant variable and exit
label, and return _SUCCESS directly on the success path.
No functional change intended.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index ca8f01575b55..ff67e2576b31 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -911,7 +911,6 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
u8 qos_option = false;
- signed int res = _SUCCESS;
__le16 *fctrl = &pwlanhdr->frame_control;
memset(hdr, 0, WLANHDR_OFFSET);
@@ -951,8 +950,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
if (pattrib->qos_en)
qos_option = true;
} else {
- res = _FAIL;
- goto exit;
+ return _FAIL;
}
if (pattrib->mdata)
@@ -1026,8 +1024,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
} else {
}
-exit:
- return res;
+ return _SUCCESS;
}
s32 rtw_txframes_pending(struct adapter *padapter)
--
2.43.0
next prev parent reply other threads:[~2026-07-13 7:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 7:05 [PATCH 0/5] staging: rtl8723bs: convert xmit helpers to return errno Hungyu Lin
2026-07-13 7:05 ` Hungyu Lin [this message]
2026-07-13 7:05 ` [PATCH 2/5] staging: rtl8723bs: convert rtw_make_wlanhdr() " Hungyu Lin
2026-07-13 8:16 ` Dan Carpenter
2026-07-13 7:05 ` [PATCH 3/5] staging: rtl8723bs: convert xmitframe_addmic() " Hungyu Lin
2026-07-13 7:05 ` [PATCH 4/5] staging: rtl8723bs: simplify rtw_xmitframe_coalesce() control flow Hungyu Lin
2026-07-13 7:05 ` [PATCH 5/5] staging: rtl8723bs: convert rtw_xmitframe_coalesce() to return errno Hungyu Lin
2026-07-13 8:15 ` [PATCH 0/5] staging: rtl8723bs: convert xmit helpers " Dan Carpenter
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=20260713070537.15903-2-dennylin0707@gmail.com \
--to=dennylin0707@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=khomenkov@mailbox.org \
--cc=khushalchitturi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=nikolayof23@gmail.com \
--cc=s9430939@naver.com \
/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