diff options
-rw-r--r-- | net/bluetooth/hci_conn.c | 10 | ||||
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 1 |
2 files changed, 2 insertions, 9 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 9483320f6dad..34d1a3c822bf 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -259,22 +259,14 @@ int hci_conn_del(struct hci_conn *conn) | |||
259 | } | 259 | } |
260 | 260 | ||
261 | tasklet_disable(&hdev->tx_task); | 261 | tasklet_disable(&hdev->tx_task); |
262 | |||
263 | hci_conn_del_sysfs(conn); | ||
264 | |||
265 | hci_conn_hash_del(hdev, conn); | 262 | hci_conn_hash_del(hdev, conn); |
266 | if (hdev->notify) | 263 | if (hdev->notify) |
267 | hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); | 264 | hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); |
268 | |||
269 | tasklet_enable(&hdev->tx_task); | 265 | tasklet_enable(&hdev->tx_task); |
270 | |||
271 | skb_queue_purge(&conn->data_q); | 266 | skb_queue_purge(&conn->data_q); |
272 | 267 | hci_conn_del_sysfs(conn); | |
273 | hci_dev_put(hdev); | 268 | hci_dev_put(hdev); |
274 | 269 | ||
275 | /* will free via device release */ | ||
276 | put_device(&conn->dev); | ||
277 | |||
278 | return 0; | 270 | return 0; |
279 | } | 271 | } |
280 | 272 | ||
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index cef1e3e1881c..cad510309dcf 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -320,6 +320,7 @@ static void del_conn(struct work_struct *work) | |||
320 | { | 320 | { |
321 | struct hci_conn *conn = container_of(work, struct hci_conn, work); | 321 | struct hci_conn *conn = container_of(work, struct hci_conn, work); |
322 | device_del(&conn->dev); | 322 | device_del(&conn->dev); |
323 | put_device(&conn->dev); | ||
323 | } | 324 | } |
324 | 325 | ||
325 | void hci_conn_del_sysfs(struct hci_conn *conn) | 326 | void hci_conn_del_sysfs(struct hci_conn *conn) |