From: Jimmy Li <coder.liss@gmail.com>
To: "Dan Carpenter" <dan.carpenter@oracle.com>,
"Joe Perches" <joe@perches.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Teodora Baluta" <teobaluta@gmail.com>,
"Peter P Waskiewicz Jr" <peter.p.waskiewicz.jr@intel.com>,
"Michael Gunselmann" <michael.gunselmann@studium.uni-erlangen.de>,
"Lisa Nguyen" <lisa@xenapiadmin.com>,
"Martin Hofmann" <martin.hofmann@studium.uni-erlangen.de>,
"Malcolm Priestley" <tvboxspy@gmail.com>,
=?utf-8?B?VMO8bGluIMSwemVy?= <tulinizer@gmail.com>,
"Archana kumari" <archanakumari959@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] drivers/staging/vt6655/iwctl.c fix a sparse warning
Date: Fri, 4 Apr 2014 00:32:29 +0800 [thread overview]
Message-ID: <20140403163229.GA21383@gmail.com> (raw)
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
next reply other threads:[~2014-04-03 16:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 16:32 Jimmy Li [this message]
2014-04-03 17:42 ` [PATCH v2] drivers/staging/vt6655/iwctl.c fix a sparse warning Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140403163229.GA21383@gmail.com \
--to=coder.liss@gmail.com \
--cc=archanakumari959@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lisa@xenapiadmin.com \
--cc=martin.hofmann@studium.uni-erlangen.de \
--cc=michael.gunselmann@studium.uni-erlangen.de \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=teobaluta@gmail.com \
--cc=tulinizer@gmail.com \
--cc=tvboxspy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.