|
@@ -709,7 +709,7 @@ static const struct ieee80211_ops mac80211_hwsim_ops =
|
|
|
static void mac80211_hwsim_free(void)
|
|
|
{
|
|
|
struct list_head tmplist, *i, *tmp;
|
|
|
- struct mac80211_hwsim_data *data;
|
|
|
+ struct mac80211_hwsim_data *data, *tmpdata;
|
|
|
|
|
|
INIT_LIST_HEAD(&tmplist);
|
|
|
|
|
@@ -718,7 +718,7 @@ static void mac80211_hwsim_free(void)
|
|
|
list_move(i, &tmplist);
|
|
|
spin_unlock_bh(&hwsim_radio_lock);
|
|
|
|
|
|
- list_for_each_entry(data, &tmplist, list) {
|
|
|
+ list_for_each_entry_safe(data, tmpdata, &tmplist, list) {
|
|
|
debugfs_remove(data->debugfs_group);
|
|
|
debugfs_remove(data->debugfs_ps);
|
|
|
debugfs_remove(data->debugfs);
|