Commit 30d991dd authored by Jimmy Li's avatar Jimmy Li Committed by Greg Kroah-Hartman

Staging: vt6655: iwctl.c: fix a sparse warning

fix a sparse warning and do some clean up.
iwctl.c:1846:35: expected restricted gfp_t [usertype] flags
Signed-off-by: default avatarJimmy Li <coder.liss@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3248c07c
......@@ -1835,19 +1835,14 @@ int iwctl_siwencodeext(struct net_device *dev,
size_t seq_len = 0, key_len = 0;
//
// int ii;
u8 *buf;
size_t blen;
u8 key_array[64];
int ret = 0;
PRINT_K("SIOCSIWENCODEEXT...... \n");
blen = sizeof(*param);
buf = kmalloc((int)blen, (int)GFP_KERNEL);
if (buf == NULL)
param = kzalloc(sizeof(*param), GFP_KERNEL);
if (param == NULL)
return -ENOMEM;
memset(buf, 0, blen);
param = (struct viawget_wpa_param *)buf;
//recover alg_name
switch (ext->alg) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment