X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fbluetooth%2Fhci_core.c;h=aec6929f5c166fd362df7e38faebb19f91f8a445;hb=061964fb988ca51087948975da66ff523b3a5852;hp=930b58e7149a77b4af84e4dd4674437b0bf31378;hpb=0dbd888936a23514716b8d944775bc56f731363a;p=linux-2.6 diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 930b58e714..aec6929f5c 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -902,8 +902,6 @@ int hci_unregister_dev(struct hci_dev *hdev) BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); - hci_unregister_sysfs(hdev); - write_lock_bh(&hci_dev_list_lock); list_del(&hdev->list); write_unlock_bh(&hci_dev_list_lock); @@ -915,6 +913,8 @@ int hci_unregister_dev(struct hci_dev *hdev) hci_notify(hdev, HCI_DEV_UNREG); + hci_unregister_sysfs(hdev); + __hci_dev_put(hdev); return 0;