usb: gadget: webcam: Make g_webcam loadable again
[platform/kernel/linux-starfive.git] / net / bluetooth / hci_core.c
index 195aea2..65601aa 100644 (file)
@@ -2535,6 +2535,8 @@ struct hci_dev *hci_alloc_dev_priv(int sizeof_priv)
        mutex_init(&hdev->lock);
        mutex_init(&hdev->req_lock);
 
+       ida_init(&hdev->unset_handle_ida);
+
        INIT_LIST_HEAD(&hdev->mesh_pending);
        INIT_LIST_HEAD(&hdev->mgmt_pending);
        INIT_LIST_HEAD(&hdev->reject_list);
@@ -2789,6 +2791,7 @@ void hci_release_dev(struct hci_dev *hdev)
        hci_codec_list_clear(&hdev->local_codecs);
        hci_dev_unlock(hdev);
 
+       ida_destroy(&hdev->unset_handle_ida);
        ida_simple_remove(&hci_index_ida, hdev->id);
        kfree_skb(hdev->sent_cmd);
        kfree_skb(hdev->recv_event);