diff options
author | Daiane Angolini <daiane.angolini@foundries.io> | 2022-07-14 08:02:44 -0300 |
---|---|---|
committer | Daiane Angolini <daiane.angolini@foundries.io> | 2022-07-14 08:02:57 -0300 |
commit | 8fe4fe4ac6ffc1510f98e3776895bbc1c07329a8 (patch) | |
tree | e634ab80708f830355d020536f12acc028f26bc8 /net | |
parent | fa1854344bc6be25a7dae33f057781980ae6b88d (diff) | |
parent | ae766496dbd448eea2af4b3be8e2b2172ce38a79 (diff) |
Merge tag 'v5.15.40' into 5.15.32-2.0.0
This is the 5.15.40 stable release
Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index c67390367cc2..cdca53732304 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3907,10 +3907,10 @@ int hci_register_dev(struct hci_dev *hdev) */ switch (hdev->dev_type) { case HCI_PRIMARY: - id = ida_simple_get(&hci_index_ida, 0, 0, GFP_KERNEL); + id = ida_simple_get(&hci_index_ida, 0, HCI_MAX_ID, GFP_KERNEL); break; case HCI_AMP: - id = ida_simple_get(&hci_index_ida, 1, 0, GFP_KERNEL); + id = ida_simple_get(&hci_index_ida, 1, HCI_MAX_ID, GFP_KERNEL); break; default: return -EINVAL; @@ -3919,7 +3919,7 @@ int hci_register_dev(struct hci_dev *hdev) if (id < 0) return id; - sprintf(hdev->name, "hci%d", id); + snprintf(hdev->name, sizeof(hdev->name), "hci%d", id); hdev->id = id; BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus); |