diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index b04a5a02ecf3..246a244cfe93 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -755,26 +755,6 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event) ev.dev_id = hdev->id; hci_si_event(NULL, HCI_EV_SI_DEVICE, sizeof(ev), &ev); } - - if (event == HCI_DEV_UNREG) { - struct sock *sk; - - /* Detach sockets from device */ - read_lock(&hci_sk_list.lock); - sk_for_each(sk, &hci_sk_list.head) { - lock_sock(sk); - if (hci_pi(sk)->hdev == hdev) { - hci_pi(sk)->hdev = NULL; - sk->sk_err = EPIPE; - sk->sk_state = BT_OPEN; - sk->sk_state_change(sk); - - hci_dev_put(hdev); - } - release_sock(sk); - } - read_unlock(&hci_sk_list.lock); - } } static struct hci_mgmt_chan *__hci_mgmt_chan_find(unsigned short channel)