[PATCH] drivers: bluetooth: fix uninitialized scalar variable
From: Alonso Garrigues
Date: Sat Apr 25 2026 - 12:39:01 EST
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@xxxxxxxxxx>
---
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