From: Nikolay Kulikov <nikolayof23@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Nikolay Kulikov <nikolayof23@gmail.com>
Subject: [PATCH 0/2] staging: rtl8723bs: remove unreachable code in
Date: Mon, 1 Jun 2026 18:01:22 +0300 [thread overview]
Message-ID: <20260601150253.69930-1-nikolayof23@gmail.com> (raw)
This series removes an unreachable switch-case branch in the
update_beacon() function. This branch doesn't check the value of the
'oui' pointer, which could lead to a NULL dereference.
Found with cppcheck:
core/rtw_ap.c:1404:27: error: Null pointer dereference: oui [ctunullpointer]
if (!memcmp(RTW_WPA_OUI, oui, 4))
^
core/rtw_ap.c:235:19: note: Calling function update_beacon, 3rd argument is null
update_beacon(padapter, WLAN_EID_TIM, NULL, true);
^
core/rtw_ap.c:1472:3: note: Calling function update_bcn_vendor_spec_ie, 2nd argument is null
update_bcn_vendor_spec_ie(padapter, oui);
^
core/rtw_ap.c:1404:27: note: Dereferencing argument oui that is null
if (!memcmp(RTW_WPA_OUI, oui, 4))
^
Nikolay Kulikov (2):
staging: rtl8723bs: remove unused case from update_beacon()
staging: rtl8723bs: remove unused 'oui' parameter from update_beacon()
drivers/staging/rtl8723bs/core/rtw_ap.c | 116 +++------------------
drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
drivers/staging/rtl8723bs/core/rtw_recv.c | 4 +-
drivers/staging/rtl8723bs/core/rtw_xmit.c | 8 +-
drivers/staging/rtl8723bs/include/rtw_ap.h | 2 +-
5 files changed, 24 insertions(+), 108 deletions(-)
base-commit: 7cb1c5b32a2bfde961fff8d5204526b609bcb30a
--
2.54.0
next reply other threads:[~2026-06-01 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 15:01 Nikolay Kulikov [this message]
2026-06-01 15:01 ` [PATCH 1/2] staging: rtl8723bs: remove unused case from update_beacon() Nikolay Kulikov
2026-06-01 15:01 ` [PATCH 2/2] staging: rtl8723bs: remove unused 'oui' parameter " Nikolay Kulikov
2026-06-02 5:35 ` [PATCH 0/2] staging: rtl8723bs: remove unreachable code in 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=20260601150253.69930-1-nikolayof23@gmail.com \
--to=nikolayof23@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