Staging: Use kcalloc or kzalloc
[safe/jmp/linux-2.6] / drivers / staging / rtl8187se / ieee80211 / ieee80211_wx.c
index acd1077..aa3ba45 100644 (file)
@@ -31,6 +31,7 @@
 ******************************************************************************/
 #include <linux/wireless.h>
 #include <linux/kmod.h>
+#include <linux/slab.h>
 #include <linux/module.h>
 
 #include "ieee80211.h"
@@ -324,11 +325,10 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
                struct ieee80211_crypt_data *new_crypt;
 
                /* take WEP into use */
-               new_crypt = kmalloc(sizeof(struct ieee80211_crypt_data),
+               new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data),
                                    GFP_KERNEL);
                if (new_crypt == NULL)
                        return -ENOMEM;
-               memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
                new_crypt->ops = ieee80211_get_crypto_ops("WEP");
                if (!new_crypt->ops)
                        new_crypt->ops = ieee80211_get_crypto_ops("WEP");
@@ -694,7 +694,7 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
 #if 1
        case IW_AUTH_WPA_ENABLED:
                ieee->wpa_enabled = (data->value)?1:0;
-               //printk("enalbe wpa:%d\n", ieee->wpa_enabled);
+               //printk("enable wpa:%d\n", ieee->wpa_enabled);
                break;
 
 #endif