lkml.org 
[lkml]   [2014]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v2] drivers/staging/vt6655/iwctl.c fix a sparse warning
Signed-off-by: Jimmy Li <coder.liss@gmail.com>
---
v2: additional cleanups as well.
drivers/staging/vt6655/iwctl.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index ac3fc16..394031b 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -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(struct viawget_wpa_param), GFP_KERNEL);
+ if (param == NULL)
return -ENOMEM;
- memset(buf, 0, blen);
- param = (struct viawget_wpa_param *)buf;

//recover alg_name
switch (ext->alg) {
--
1.7.9.5


\
 
 \ /
  Last update: 2014-04-04 05:21    [W:0.162 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site