aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/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/rtl8192u/ieee80211/ieee80211_softmac.c
parenta05d08c40c0775e4691cffcfbfceeb4270987208 (diff)
downloadkernel_samsung_smdk4412-324148788bf3744d90fb6894ec5744eb0ca91b74.zip
kernel_samsung_smdk4412-324148788bf3744d90fb6894ec5744eb0ca91b74.tar.gz
kernel_samsung_smdk4412-324148788bf3744d90fb6894ec5744eb0ca91b74.tar.bz2
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/rtl8192u/ieee80211/ieee80211_softmac.c')
-rw-r--r--drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index e5e583e..6c6bf9f 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -1579,7 +1579,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);
if (!*challenge)
return -ENOMEM;
memcpy(*challenge, t, *chlen);
@@ -3077,8 +3077,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;
@@ -3210,7 +3209,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;