Commit 5c6761ad authored by Fabian Frederick's avatar Fabian Frederick Committed by Johannes Berg

mac80211: remove unnecessary null test before debugfs_remove()

The debugfs_remove() function can safely take NULL parameters
so the additionally null test isn't required, and there's no
other reason to have it here, so remove it.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
[rewrite commit message, re-introduce blank line after assert]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 9208247d
...@@ -300,10 +300,8 @@ void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata) ...@@ -300,10 +300,8 @@ void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata)
lockdep_assert_held(&sdata->local->key_mtx); lockdep_assert_held(&sdata->local->key_mtx);
if (sdata->debugfs.default_unicast_key) { debugfs_remove(sdata->debugfs.default_unicast_key);
debugfs_remove(sdata->debugfs.default_unicast_key); sdata->debugfs.default_unicast_key = NULL;
sdata->debugfs.default_unicast_key = NULL;
}
if (sdata->default_unicast_key) { if (sdata->default_unicast_key) {
key = key_mtx_dereference(sdata->local, key = key_mtx_dereference(sdata->local,
...@@ -314,10 +312,8 @@ void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata) ...@@ -314,10 +312,8 @@ void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata)
sdata->vif.debugfs_dir, buf); sdata->vif.debugfs_dir, buf);
} }
if (sdata->debugfs.default_multicast_key) { debugfs_remove(sdata->debugfs.default_multicast_key);
debugfs_remove(sdata->debugfs.default_multicast_key); sdata->debugfs.default_multicast_key = NULL;
sdata->debugfs.default_multicast_key = NULL;
}
if (sdata->default_multicast_key) { if (sdata->default_multicast_key) {
key = key_mtx_dereference(sdata->local, key = key_mtx_dereference(sdata->local,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment