From: Marco Antonio Solis Segura <mshdevv@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Marco Antonio Solis Segura <mshdevv@gmail.com>
Subject: [PATCH] staging: rtl8723bs: split multiple assignment in rtw_mgmt_xmitframe_coalesce
Date: Thu, 19 Mar 2026 00:26:26 -0600 [thread overview]
Message-ID: <20260319062626.605200-1-mshdevv@gmail.com> (raw)
Cleanup the multiple assignment of tmp_buf and BIP_AAD to fix the
checkpatch.pl CHECK: "Multiple assignments should be avoided".
Additionally, reorder the assignments to ensure tmp_buf is assigned
only after BIP_AAD has been validated as non-NULL.
Signed-off-by: Marco Antonio Solis Segura <mshdevv@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 19758e2f5903..d75f60efb7b6 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -1194,12 +1194,13 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
pwlanhdr = (struct ieee80211_hdr *)pframe;
ori_len = BIP_AAD_SIZE + pattrib->pktlen;
- tmp_buf = BIP_AAD = kzalloc(ori_len, GFP_ATOMIC);
- subtype = GetFrameSubType(pframe); /* bit(7)~bit(2) */
+ BIP_AAD = kzalloc(ori_len, GFP_ATOMIC);
if (!BIP_AAD)
return _FAIL;
+ tmp_buf = BIP_AAD;
+ subtype = GetFrameSubType(pframe); /* bit(7)~bit(2) */
spin_lock_bh(&padapter->security_key_mutex);
/* only support station mode */
--
2.53.0
reply other threads:[~2026-03-19 6:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260319062626.605200-1-mshdevv@gmail.com \
--to=mshdevv@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.