From 38b7da09cfdb2202f08476d6fb22a47649a177ec Mon Sep 17 00:00:00 2001 From: Dave Young Date: Sat, 29 Dec 2007 19:17:47 -0800 Subject: [BLUETOOTH]: put_device before device_del fix Because of workqueue delay, the put_device could be called before device_del, so move it to del_conn. Signed-off-by: Dave Young Signed-off-by: David S. Miller --- net/bluetooth/hci_conn.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'net/bluetooth/hci_conn.c') diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 9483320..34d1a3c 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) } tasklet_disable(&hdev->tx_task); - - hci_conn_del_sysfs(conn); - hci_conn_hash_del(hdev, conn); if (hdev->notify) hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); - tasklet_enable(&hdev->tx_task); - skb_queue_purge(&conn->data_q); - + hci_conn_del_sysfs(conn); hci_dev_put(hdev); - /* will free via device release */ - put_device(&conn->dev); - return 0; } -- cgit v1.1