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: Jimmy Li <coder.liss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jimmy Li 2014-04-08 21:35:02 +08:00 committed by Greg Kroah-Hartman
parent 3248c07c7b
commit 30d991dd44
1 changed files with 2 additions and 7 deletions

View File

@ -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) {