diff options
Diffstat (limited to 'net/bluetooth/hci_sysfs.c')
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index f5aff6d0988a..767756c8fbcf 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -334,6 +334,7 @@ static int __match_tty(struct device *dev, void *data) | |||
334 | static void del_conn(struct work_struct *work) | 334 | static void del_conn(struct work_struct *work) |
335 | { | 335 | { |
336 | struct hci_conn *conn = container_of(work, struct hci_conn, work); | 336 | struct hci_conn *conn = container_of(work, struct hci_conn, work); |
337 | struct hci_dev *hdev = conn->hdev; | ||
337 | 338 | ||
338 | while (1) { | 339 | while (1) { |
339 | struct device *dev; | 340 | struct device *dev; |
@@ -344,8 +345,10 @@ static void del_conn(struct work_struct *work) | |||
344 | device_move(dev, NULL); | 345 | device_move(dev, NULL); |
345 | put_device(dev); | 346 | put_device(dev); |
346 | } | 347 | } |
348 | |||
347 | device_del(&conn->dev); | 349 | device_del(&conn->dev); |
348 | put_device(&conn->dev); | 350 | put_device(&conn->dev); |
351 | hci_dev_put(hdev); | ||
349 | } | 352 | } |
350 | 353 | ||
351 | void hci_conn_del_sysfs(struct hci_conn *conn) | 354 | void hci_conn_del_sysfs(struct hci_conn *conn) |