--- x/net/mac80211/debugfs_sta.c +++ y/net/mac80211/debugfs_sta.c @@ -1276,6 +1276,12 @@ void ieee80211_sta_debugfs_add(struct st void ieee80211_sta_debugfs_remove(struct sta_info *sta) { + struct dentry *stations_dir = sta->sdata->debugfs.subdir_stations; + + if (!stations_dir) + return; + if (!sta->debugfs_dir) + return; debugfs_remove_recursive(sta->debugfs_dir); sta->debugfs_dir = NULL; }