aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-05-11 20:26:57 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-11 16:06:48 -0700
commit324148788bf3744d90fb6894ec5744eb0ca91b74 (patch)
treebb6a978e2c0ee43fd1588a898e9277f619b31c91 /drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
parentStaging: wlan-ng: Fixed non static functions in prism2fw.c (diff)
downloadlinux-dev-324148788bf3744d90fb6894ec5744eb0ca91b74.tar.xz
linux-dev-324148788bf3744d90fb6894ec5744eb0ca91b74.zip
Staging: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; @@ - (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c')
-rw-r--r--drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
index 3cf5fdf8a8cb..660aee2874a4 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
@@ -1557,7 +1557,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen)
if(*(t++) == MFIE_TYPE_CHALLENGE){
*chlen = *(t++);
- *challenge = (u8*)kmalloc(*chlen, GFP_ATOMIC);
+ *challenge = kmalloc(*chlen, GFP_ATOMIC);
memcpy(*challenge, t, *chlen);
}
}
@@ -3048,8 +3048,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
ieee80211_crypt_delayed_deinit(ieee, crypt);
- new_crypt = (struct ieee80211_crypt_data *)
- kmalloc(sizeof(*new_crypt), GFP_KERNEL);
+ new_crypt = kmalloc(sizeof(*new_crypt), GFP_KERNEL);
if (new_crypt == NULL) {
ret = -ENOMEM;
goto done;
@@ -3182,7 +3181,7 @@ int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_poin
goto out;
}
- param = (struct ieee_param *)kmalloc(p->length, GFP_KERNEL);
+ param = kmalloc(p->length, GFP_KERNEL);
if (param == NULL){
ret = -ENOMEM;
goto out;