linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] Bluetooth: btbcm: Drop upper nibble version check from btbcm_initialize()
@ 2020-04-17 17:15 Hans de Goede
  2020-04-17 17:15 ` [PATCH 2/8] Bluetooth: btbcm: Move setting of USE_BDADDR_PROPERTY quirk to hci_bcm.c Hans de Goede
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Hans de Goede @ 2020-04-17 17:15 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg; +Cc: Hans de Goede, linux-bluetooth

btbcm_initialize() must either return an error; or fill the passed in
fw_name, otherwise we end up passing uninitialized stack memory to
request_firmware().

Since we have a fallback hw_name of "BCM" not having a known version
in the subver field does not matter, drop the check so that we always
fill the passed in fw_name.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/bluetooth/btbcm.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index 1f498f358f60..b9e1fe052148 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -440,10 +440,6 @@ int btbcm_initialize(struct hci_dev *hdev, char *fw_name, size_t len,
 			return err;
 	}
 
-	/* Upper nibble of rev should be between 0 and 3? */
-	if (((rev & 0xf000) >> 12) > 3)
-		return 0;
-
 	bcm_subver_table = (hdev->bus == HCI_USB) ? bcm_usb_subver_table :
 						    bcm_uart_subver_table;
 
-- 
2.26.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-22 17:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 17:15 [PATCH 1/8] Bluetooth: btbcm: Drop upper nibble version check from btbcm_initialize() Hans de Goede
2020-04-17 17:15 ` [PATCH 2/8] Bluetooth: btbcm: Move setting of USE_BDADDR_PROPERTY quirk to hci_bcm.c Hans de Goede
2020-04-17 17:15 ` [PATCH 3/8] Bluetooth: btbcm: Fold Patch loading + applying into btbcm_initialize() Hans de Goede
2020-04-17 17:15 ` [PATCH 4/8] Bluetooth: btbcm: Make btbcm_initialize() print local-name on re-init too Hans de Goede
2020-04-17 17:15 ` [PATCH 5/8] Bluetooth: btbcm: Make btbcm_setup_patchram use btbcm_finalize Hans de Goede
2020-04-17 17:15 ` [PATCH 6/8] Bluetooth: btbcm: Bail sooner from btbcm_initialize() when not loading fw Hans de Goede
2020-04-17 17:15 ` [PATCH 7/8] Bluetooth: btbcm: Try multiple Patch filenames when loading the Patch firmware Hans de Goede
2020-04-17 17:15 ` [PATCH 8/8] Bluetooth: btbcm: Add 2 missing models to subver tables Hans de Goede
2020-04-22 17:44 ` [PATCH 1/8] Bluetooth: btbcm: Drop upper nibble version check from btbcm_initialize() Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).