aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorFlorian Schilhabel <florian.c.schilhabel@googlemail.com>2010-02-19 14:12:12 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 19:43:05 -0500
commit7bd795bfcd7eb2f2962d458bf787d5ee0d1167cd (patch)
tree9da40c9fa08178b9e52d4116629032eeda6d988b /drivers/staging
parenta99840b1aa66d3797bfe0be4fb6982bba62d815b (diff)
Staging: rtl8192su: use list_for_each_safe() in ieee80211_crypto_deinit
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtl8192su/TODO1
-rw-r--r--drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c19
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/rtl8192su/TODO b/drivers/staging/rtl8192su/TODO
index f11eec70003..3c8da157a93 100644
--- a/drivers/staging/rtl8192su/TODO
+++ b/drivers/staging/rtl8192su/TODO
@@ -4,7 +4,6 @@ TODO:
4 - cleanup ieee80211.h 4 - cleanup ieee80211.h
5 - move rtl8192su's specific code out from ieee80211.h 5 - move rtl8192su's specific code out from ieee80211.h
6 - abstract rtl819su's specific code 6 - abstract rtl819su's specific code
7 - use list_for_each_safe() in ieee80211_crypto_deinit
8- switch to use shared "librtl" instead of private ieee80211 stack 7- switch to use shared "librtl" instead of private ieee80211 stack
9- switch to use LIB80211 8- switch to use LIB80211
10- switch to use MAC80211 9- switch to use MAC80211
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c
index 521e7b98993..c4640e63196 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c
@@ -226,19 +226,20 @@ out:
226void __exit ieee80211_crypto_deinit(void) 226void __exit ieee80211_crypto_deinit(void)
227{ 227{
228 struct list_head *ptr, *n; 228 struct list_head *ptr, *n;
229 struct ieee80211_crypto_alg *alg = NULL;
229 230
230 if (hcrypt == NULL) 231 if (hcrypt == NULL)
231 return; 232 return;
232 233
233 for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs; 234 list_for_each_safe(ptr, n, &hcrypt->algs) {
234 ptr = n, n = ptr->next) { 235 alg = list_entry(ptr, struct ieee80211_crypto_alg, list);
235 struct ieee80211_crypto_alg *alg = 236 if (alg) {
236 (struct ieee80211_crypto_alg *) ptr; 237 list_del(ptr);
237 list_del(ptr); 238 printk(KERN_DEBUG
238 printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm " 239 "ieee80211_crypt: unregistered algorithm '%s' (deinit)\n",
239 "'%s' (deinit)\n", alg->ops->name); 240 alg->ops->name);
240 kfree(alg); 241 kfree(alg);
242 }
241 } 243 }
242
243 kfree(hcrypt); 244 kfree(hcrypt);
244} 245}