diff options
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/w1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index cb3650efc..8db9ca241 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -1237,10 +1237,10 @@ err_out_exit_init: static void __exit w1_fini(void) { - struct w1_master *dev; + struct w1_master *dev, *n; /* Set netlink removal messages and some cleanup */ - list_for_each_entry(dev, &w1_masters, w1_master_entry) + list_for_each_entry_safe(dev, n, &w1_masters, w1_master_entry) __w1_remove_master_device(dev); w1_fini_netlink(); |