diff options
Diffstat (limited to 'net/mac80211/key.c')
-rw-r--r-- | net/mac80211/key.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index b510721e3b3d..958832dd4f0a 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -471,8 +471,11 @@ int ieee80211_key_link(struct ieee80211_key *key, | |||
471 | return ret; | 471 | return ret; |
472 | } | 472 | } |
473 | 473 | ||
474 | static void __ieee80211_key_free(struct ieee80211_key *key) | 474 | void __ieee80211_key_free(struct ieee80211_key *key) |
475 | { | 475 | { |
476 | if (!key) | ||
477 | return; | ||
478 | |||
476 | /* | 479 | /* |
477 | * Replace key with nothingness if it was ever used. | 480 | * Replace key with nothingness if it was ever used. |
478 | */ | 481 | */ |
@@ -486,9 +489,6 @@ static void __ieee80211_key_free(struct ieee80211_key *key) | |||
486 | void ieee80211_key_free(struct ieee80211_local *local, | 489 | void ieee80211_key_free(struct ieee80211_local *local, |
487 | struct ieee80211_key *key) | 490 | struct ieee80211_key *key) |
488 | { | 491 | { |
489 | if (!key) | ||
490 | return; | ||
491 | |||
492 | mutex_lock(&local->key_mtx); | 492 | mutex_lock(&local->key_mtx); |
493 | __ieee80211_key_free(key); | 493 | __ieee80211_key_free(key); |
494 | mutex_unlock(&local->key_mtx); | 494 | mutex_unlock(&local->key_mtx); |