From: Hungyu Lin <dennylin0707@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <error27@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH v2 1/5] staging: rtl8723bs: simplify rtw_xmit_classifier control flow
Date: Thu, 14 May 2026 10:07:04 +0000 [thread overview]
Message-ID: <20260514100708.25031-2-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260514100708.25031-1-dennylin0707@gmail.com>
Simplify rtw_xmit_classifier() by removing the exit label and
using direct returns for error handling.
No functional change.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 458e471535ad..72e5dddfee5d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -1874,16 +1874,13 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
struct tx_servq *ptxservq;
struct pkt_attrib *pattrib = &pxmitframe->attrib;
struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits;
- signed int res = _SUCCESS;
psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
if (pattrib->psta != psta)
return _FAIL;
- if (!psta) {
- res = _FAIL;
- goto exit;
- }
+ if (!psta)
+ return _FAIL;
if (!(psta->state & _FW_LINKED))
return _FAIL;
@@ -1897,9 +1894,7 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
ptxservq->qcnt++;
phwxmits[ac_index].accnt++;
-exit:
-
- return res;
+ return _SUCCESS;
}
void rtw_free_hwxmits(struct adapter *padapter)
--
2.34.1
next prev parent reply other threads:[~2026-05-14 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 10:07 [PATCH v2 0/5] staging: rtl8723bs: clean up xmit classifier and propagate errno Hungyu Lin
2026-05-14 10:07 ` Hungyu Lin [this message]
2026-05-14 10:07 ` [PATCH v2 2/5] staging: rtl8723bs: make rtw_xmit_classifier static Hungyu Lin
2026-05-14 10:07 ` [PATCH v2 3/5] staging: rtl8723bs: convert rtw_xmit_classifier to return errno Hungyu Lin
2026-05-14 10:07 ` [PATCH v2 4/5] staging: rtl8723bs: propagate errno through xmit enqueue path Hungyu Lin
2026-05-14 10:07 ` [PATCH v2 5/5] staging: rtl8723bs: propagate errno through hal xmit path Hungyu Lin
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=20260514100708.25031-2-dennylin0707@gmail.com \
--to=dennylin0707@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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