From: Joe Perches <joe@perches.com>
To: Jimmy Li <coder.liss@gmail.com>
Cc: "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>,
"Tülin İzer" <tulinizer@gmail.com>,
"Archana kumari" <archanakumari959@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/staging/vt6655/iwctl.c fix a sparse warning
Date: Wed, 26 Mar 2014 08:16:22 -0700 [thread overview]
Message-ID: <1395846982.3726.18.camel@joe-AO722> (raw)
In-Reply-To: <20140326074243.GA15228@gmail.com>
On Wed, 2014-03-26 at 00:42 -0700, Jimmy Li wrote:
> fix a sparse warning.
[]
> diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
[]
> @@ -1843,7 +1843,7 @@ int iwctl_siwencodeext(struct net_device *dev,
[]
> blen = sizeof(*param);
> - buf = kmalloc((int)blen, (int)GFP_KERNEL);
> + buf = kmalloc((int)blen, GFP_KERNEL);
> if (buf == NULL)
> return -ENOMEM;
> memset(buf, 0, blen);
Ideally, this would be
buf = kzalloc(sizeof(*param), GFP_KERNEL);
if (!buf)
return -ENOMEM;
removing the now unused blen variable declaration
and without the now unnecessary memset
next prev parent reply other threads:[~2014-03-26 15:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 7:42 Jimmy Li
2014-03-26 12:10 ` Greg Kroah-Hartman
2014-03-26 15:16 ` Joe Perches [this message]
2014-03-28 3:28 ` Jimmy Li
2014-04-03 9:04 ` 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=1395846982.3726.18.camel@joe-AO722 \
--to=joe@perches.com \
--cc=archanakumari959@gmail.com \
--cc=coder.liss@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®