aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_ioctl.c
diff options
context:
space:
mode:
authorYan Burman <burman.yan@gmail.com>2006-12-02 06:33:40 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-12-05 19:31:32 -0500
commitb0471bb7b779f5deea109e5bfdfe8c18d4a06241 (patch)
treed2fffb2916469c84b20a3e8e747cbf77d1a00e70 /drivers/net/wireless/hostap/hostap_ioctl.c
parent9cdac9657fda58ae39c2bbc8be396f5530ed8398 (diff)
[PATCH] hostap: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_ioctl.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index d061fb3443ff..3b7b8063ff1c 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -181,12 +181,10 @@ static int prism2_ioctl_siwencode(struct net_device *dev,
181 struct ieee80211_crypt_data *new_crypt; 181 struct ieee80211_crypt_data *new_crypt;
182 182
183 /* take WEP into use */ 183 /* take WEP into use */
184 new_crypt = (struct ieee80211_crypt_data *) 184 new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data),
185 kmalloc(sizeof(struct ieee80211_crypt_data),
186 GFP_KERNEL); 185 GFP_KERNEL);
187 if (new_crypt == NULL) 186 if (new_crypt == NULL)
188 return -ENOMEM; 187 return -ENOMEM;
189 memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
190 new_crypt->ops = ieee80211_get_crypto_ops("WEP"); 188 new_crypt->ops = ieee80211_get_crypto_ops("WEP");
191 if (!new_crypt->ops) { 189 if (!new_crypt->ops) {
192 request_module("ieee80211_crypt_wep"); 190 request_module("ieee80211_crypt_wep");
@@ -3320,14 +3318,12 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev,
3320 3318
3321 prism2_crypt_delayed_deinit(local, crypt); 3319 prism2_crypt_delayed_deinit(local, crypt);
3322 3320
3323 new_crypt = (struct ieee80211_crypt_data *) 3321 new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data),
3324 kmalloc(sizeof(struct ieee80211_crypt_data),
3325 GFP_KERNEL); 3322 GFP_KERNEL);
3326 if (new_crypt == NULL) { 3323 if (new_crypt == NULL) {
3327 ret = -ENOMEM; 3324 ret = -ENOMEM;
3328 goto done; 3325 goto done;
3329 } 3326 }
3330 memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
3331 new_crypt->ops = ops; 3327 new_crypt->ops = ops;
3332 new_crypt->priv = new_crypt->ops->init(i); 3328 new_crypt->priv = new_crypt->ops->init(i);
3333 if (new_crypt->priv == NULL) { 3329 if (new_crypt->priv == NULL) {
@@ -3538,14 +3534,12 @@ static int prism2_ioctl_set_encryption(local_info_t *local,
3538 3534
3539 prism2_crypt_delayed_deinit(local, crypt); 3535 prism2_crypt_delayed_deinit(local, crypt);
3540 3536
3541 new_crypt = (struct ieee80211_crypt_data *) 3537 new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data),
3542 kmalloc(sizeof(struct ieee80211_crypt_data),
3543 GFP_KERNEL); 3538 GFP_KERNEL);
3544 if (new_crypt == NULL) { 3539 if (new_crypt == NULL) {
3545 ret = -ENOMEM; 3540 ret = -ENOMEM;
3546 goto done; 3541 goto done;
3547 } 3542 }
3548 memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
3549 new_crypt->ops = ops; 3543 new_crypt->ops = ops;
3550 new_crypt->priv = new_crypt->ops->init(param->u.crypt.idx); 3544 new_crypt->priv = new_crypt->ops->init(param->u.crypt.idx);
3551 if (new_crypt->priv == NULL) { 3545 if (new_crypt->priv == NULL) {