Linux kernel staging patches
 help / color / mirror / Atom feed
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 4/5] staging: rtl8723bs: simplify rtw_xmitframe_coalesce() control flow
Date: Mon, 13 Jul 2026 07:05:36 +0000	[thread overview]
Message-ID: <20260713070537.15903-5-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260713070537.15903-1-dennylin0707@gmail.com>

Replace goto-based error handling with direct returns and
remove the temporary res variable.

No functional change intended.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 07e413f4dbdb..d4bdda50b68f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -1082,7 +1082,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
 	u8 *pbuf_start;
 
 	s32 bmcst = is_multicast_ether_addr(pattrib->ra);
-	s32 res = _SUCCESS;
 	int ret;
 
 	if (!pxmitframe->buf_addr)
@@ -1094,10 +1093,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
 	mem_start = pbuf_start +	hw_hdr_offset;
 
 	ret = rtw_make_wlanhdr(padapter, mem_start, pattrib);
-	if (ret) {
-		res = _FAIL;
-		goto exit;
-	}
+	if (ret)
+		return _FAIL;
 
 	_rtw_open_pktfile(pkt, &pktfile);
 	ret = _rtw_pktfile_read(&pktfile, NULL, pattrib->pkt_hdrlen);
@@ -1176,10 +1173,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
 	}
 
 	ret = xmitframe_addmic(padapter, pxmitframe);
-	if (ret) {
-		res = _FAIL;
-		goto exit;
-	}
+	if (ret)
+		return _FAIL;
 
 	xmitframe_swencrypt(padapter, pxmitframe);
 
@@ -1188,8 +1183,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
 	else
 		pattrib->vcs_mode = NONE_VCS;
 
-exit:
-	return res;
+	return _SUCCESS;
 }
 
 /* broadcast or multicast management pkt use BIP, unicast management pkt use CCMP encryption */
-- 
2.43.0


  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 ` [PATCH 1/5] staging: rtl8723bs: remove redundant return variable in rtw_make_wlanhdr() Hungyu Lin
2026-07-13  7:05 ` [PATCH 2/5] staging: rtl8723bs: convert rtw_make_wlanhdr() to return errno 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 ` Hungyu Lin [this message]
2026-07-13  7:05 ` [PATCH 5/5] staging: rtl8723bs: convert rtw_xmitframe_coalesce() " 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-5-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