summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/btbcm.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2020-04-17 20:15:25 +0300
committerMarcel Holtmann <marcel@holtmann.org>2020-04-22 20:43:58 +0300
commit3fef10ec321ced8e75cd0a28616402401cbbcaf4 (patch)
tree089b0a4bfa516b3383d732102b8941498604781d /drivers/bluetooth/btbcm.c
parent44dd5efc97dae0dc09ea9316597826c8b0fd1578 (diff)
downloadlinux-3fef10ec321ced8e75cd0a28616402401cbbcaf4.tar.xz
Bluetooth: btbcm: Drop upper nibble version check from btbcm_initialize()
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> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btbcm.c')
-rw-r--r--drivers/bluetooth/btbcm.c4
1 files changed, 0 insertions, 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;