aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/hci_sysfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index e13cf5ef144c..f5aff6d0988a 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -333,10 +333,14 @@ static int __match_tty(struct device *dev, void *data)
333 333
334static void del_conn(struct work_struct *work) 334static void del_conn(struct work_struct *work)
335{ 335{
336 struct device *dev;
337 struct hci_conn *conn = container_of(work, struct hci_conn, work); 336 struct hci_conn *conn = container_of(work, struct hci_conn, work);
338 337
339 while (dev = device_find_child(&conn->dev, NULL, __match_tty)) { 338 while (1) {
339 struct device *dev;
340
341 dev = device_find_child(&conn->dev, NULL, __match_tty);
342 if (!dev)
343 break;
340 device_move(dev, NULL); 344 device_move(dev, NULL);
341 put_device(dev); 345 put_device(dev);
342 } 346 }