From: Alonso Garrigues <agarrigues@riseup.net>
To: Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drivers: bluetooth: fix uninitialized scalar variable
Date: Sat, 25 Apr 2026 17:38:30 +0100 [thread overview]
Message-ID: <aezuBuQca26r4a7l@lal> (raw)
There is a path where the variable is read uninitialized,
in case RTL_PATCH_SECURITY_HEADER and !key_id
Signed-off-by: Alonso Garrigues <agarrigues@riseup.net>
---
drivers/bluetooth/btrtl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 62f9d4df3a4f..aa0d5af26b5f 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -543,7 +543,7 @@ static int rtlbt_parse_firmware_v2(struct hci_dev *hdev,
unsigned char **_buf)
{
struct rtl_epatch_header_v2 *hdr;
- int rc;
+ int rc = 0;
u8 key_id;
u32 num_sections;
struct rtl_section *section;
--
2.53.0
next reply other threads:[~2026-04-25 16:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 16:38 Alonso Garrigues [this message]
2026-04-25 17:25 ` drivers: bluetooth: fix uninitialized scalar variable bluez.test.bot
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=aezuBuQca26r4a7l@lal \
--to=agarrigues@riseup.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
/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