* [PATCH] Bluetooth: btrtl: fix uninitialized scalar value
@ 2026-04-25 17:51 Alonso Garrigues
0 siblings, 0 replies; only message in thread
From: Alonso Garrigues @ 2026-04-25 17:51 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz; +Cc: linux-bluetooth, linux-kernel
There is a path where the variable is read uninitialized:
If the opcode switch case is RTL_PATCH_SECURITY_HEADER and key_id is
not set, the if statement condition immediately following the switch
checks an uninitialized rc
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-25 17:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-25 17:51 [PATCH] Bluetooth: btrtl: fix uninitialized scalar value Alonso Garrigues
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox