From: David S. Miller Date: Fri, 20 Aug 2021 11:16:05 +0000 (+0100) Subject: Merge tag 'for-net-next-2021-08-19' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e61fbee7be4b9566f8e8fcb15aadad0f17936c31;p=linux.git Merge tag 'for-net-next-2021-08-19' of git://git./linux/kernel/git/bluetooth/bluetooth-next Luiz Augusto von Dentz says: ==================== bluetooth-next pull request for net-next: - Add support for Foxconn Mediatek Chip - Add support for LG LGSBWAC92/TWCM-K505D - hci_h5 flow control fixes and suspend support - Switch to use lock_sock for SCO and RFCOMM - Various fixes for extended advertising - Reword Intel's setup on btusb unifying the supported generations ==================== Signed-off-by: David S. Miller --- e61fbee7be4b9566f8e8fcb15aadad0f17936c31 diff --cc net/bluetooth/hci_core.c index e1a545c8a69f8,fb296478b86e4..8a47a3017d61d --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@@ -4034,7 -4048,6 +4048,7 @@@ void hci_unregister_dev(struct hci_dev } device_del(&hdev->dev); - /* Actual cleanup is deferred until hci_cleanup_dev(). */ ++ /* Actual cleanup is deferred until hci_release_dev(). */ hci_dev_put(hdev); } EXPORT_SYMBOL(hci_unregister_dev); diff --cc net/bluetooth/hci_sysfs.c index b69d88b88d2e4,ebf282d1eb2b1..7827639ecf5c3 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c @@@ -83,10 -83,7 +83,9 @@@ void hci_conn_del_sysfs(struct hci_con static void bt_host_release(struct device *dev) { struct hci_dev *hdev = to_hci_dev(dev); - hci_release_dev(hdev); + + if (hci_dev_test_flag(hdev, HCI_UNREGISTER)) - hci_cleanup_dev(hdev); - kfree(hdev); ++ hci_release_dev(hdev); module_put(THIS_MODULE); }