diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/6lowpan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 7254bddaca2f..eef298d17452 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c | |||
@@ -1383,7 +1383,7 @@ static const struct file_operations lowpan_control_fops = { | |||
1383 | 1383 | ||
1384 | static void disconnect_devices(void) | 1384 | static void disconnect_devices(void) |
1385 | { | 1385 | { |
1386 | struct lowpan_dev *entry, *new_dev; | 1386 | struct lowpan_dev *entry, *tmp, *new_dev; |
1387 | struct list_head devices; | 1387 | struct list_head devices; |
1388 | 1388 | ||
1389 | INIT_LIST_HEAD(&devices); | 1389 | INIT_LIST_HEAD(&devices); |
@@ -1408,7 +1408,7 @@ static void disconnect_devices(void) | |||
1408 | 1408 | ||
1409 | rcu_read_unlock(); | 1409 | rcu_read_unlock(); |
1410 | 1410 | ||
1411 | list_for_each_entry(entry, &devices, list) { | 1411 | list_for_each_entry_safe(entry, tmp, &devices, list) { |
1412 | ifdown(entry->netdev); | 1412 | ifdown(entry->netdev); |
1413 | BT_DBG("Unregistering netdev %s %p", | 1413 | BT_DBG("Unregistering netdev %s %p", |
1414 | entry->netdev->name, entry->netdev); | 1414 | entry->netdev->name, entry->netdev); |