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_sysfs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/bluetooth/hci_sysfs.c') diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index cef1e3e1881..cad510309dc 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) { struct hci_conn *conn = container_of(work, struct hci_conn, work); device_del(&conn->dev); + put_device(&conn->dev); } void hci_conn_del_sysfs(struct hci_conn *conn) -- cgit v1.2.3-70-g09d2