aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_conn.c2
-rw-r--r--net/bluetooth/hci_sysfs.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 61309b26f271..85a1c6be2db9 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -292,6 +292,8 @@ int hci_conn_del(struct hci_conn *conn)
292 292
293 hci_conn_del_sysfs(conn); 293 hci_conn_del_sysfs(conn);
294 294
295 hci_dev_put(hdev);
296
295 return 0; 297 return 0;
296} 298}
297 299
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index a05d45eb3ba1..4cc3624bd22d 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -99,6 +99,8 @@ static void add_conn(struct work_struct *work)
99 BT_ERR("Failed to register connection device"); 99 BT_ERR("Failed to register connection device");
100 return; 100 return;
101 } 101 }
102
103 hci_dev_hold(hdev);
102} 104}
103 105
104/* 106/*
@@ -134,6 +136,7 @@ static void del_conn(struct work_struct *work)
134 136
135 device_del(&conn->dev); 137 device_del(&conn->dev);
136 put_device(&conn->dev); 138 put_device(&conn->dev);
139
137 hci_dev_put(hdev); 140 hci_dev_put(hdev);
138} 141}
139 142