Commit 7bd795bf authored by Florian Schilhabel's avatar Florian Schilhabel Committed by Greg Kroah-Hartman

Staging: rtl8192su: use list_for_each_safe() in ieee80211_crypto_deinit

Signed-off-by: default avatarFlorian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a99840b1
...@@ -4,7 +4,6 @@ TODO: ...@@ -4,7 +4,6 @@ TODO:
- cleanup ieee80211.h - cleanup ieee80211.h
- move rtl8192su's specific code out from ieee80211.h - move rtl8192su's specific code out from ieee80211.h
- abstract rtl819su's specific code - abstract rtl819su's specific code
- use list_for_each_safe() in ieee80211_crypto_deinit
- switch to use shared "librtl" instead of private ieee80211 stack - switch to use shared "librtl" instead of private ieee80211 stack
- switch to use LIB80211 - switch to use LIB80211
- switch to use MAC80211 - switch to use MAC80211
......
...@@ -226,19 +226,20 @@ out: ...@@ -226,19 +226,20 @@ out:
void __exit ieee80211_crypto_deinit(void) void __exit ieee80211_crypto_deinit(void)
{ {
struct list_head *ptr, *n; struct list_head *ptr, *n;
struct ieee80211_crypto_alg *alg = NULL;
if (hcrypt == NULL) if (hcrypt == NULL)
return; return;
for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs; list_for_each_safe(ptr, n, &hcrypt->algs) {
ptr = n, n = ptr->next) { alg = list_entry(ptr, struct ieee80211_crypto_alg, list);
struct ieee80211_crypto_alg *alg = if (alg) {
(struct ieee80211_crypto_alg *) ptr; list_del(ptr);
list_del(ptr); printk(KERN_DEBUG
printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm " "ieee80211_crypt: unregistered algorithm '%s' (deinit)\n",
"'%s' (deinit)\n", alg->ops->name); alg->ops->name);
kfree(alg); kfree(alg);
}
} }
kfree(hcrypt); kfree(hcrypt);
} }
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