From: yalin wang <yalin.wang2010@gmail.com>
To: ulf.hansson@linaro.org, adrian.hunter@intel.com,
akpm@linux-foundation.org, tklauser@distanz.ch,
yalin.wang2010@gmail.com, JBottomley@Odin.com,
ben@decadent.org.uk, chuanxiao.dong@intel.com,
shawn.lin@rock-chips.com, justin.wang@spreadtrum.com,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH V2] mmc: change to use kmalloc
Date: Thu, 12 Nov 2015 19:27:11 +0800 [thread overview]
Message-ID: <1447327631-26947-1-git-send-email-yalin.wang2010@gmail.com> (raw)
Use kmalloc instead of kzalloc, zero the memory is not needed.
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
drivers/mmc/card/block.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c742cfd..c3fd4c8 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -345,7 +345,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
struct mmc_blk_ioc_data *idata;
int err;
- idata = kzalloc(sizeof(*idata), GFP_KERNEL);
+ idata = kmalloc(sizeof(*idata), GFP_KERNEL);
if (!idata) {
err = -ENOMEM;
goto out;
@@ -365,7 +365,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
if (!idata->buf_bytes)
return idata;
- idata->buf = kzalloc(idata->buf_bytes, GFP_KERNEL);
+ idata->buf = kmalloc(idata->buf_bytes, GFP_KERNEL);
if (!idata->buf) {
err = -ENOMEM;
goto idata_err;
--
1.9.1
next reply other threads:[~2015-11-12 11:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 11:27 yalin wang [this message]
2015-11-19 11:31 ` Ulf Hansson
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=1447327631-26947-1-git-send-email-yalin.wang2010@gmail.com \
--to=yalin.wang2010@gmail.com \
--cc=JBottomley@Odin.com \
--cc=adrian.hunter@intel.com \
--cc=akpm@linux-foundation.org \
--cc=ben@decadent.org.uk \
--cc=chuanxiao.dong@intel.com \
--cc=justin.wang@spreadtrum.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=tklauser@distanz.ch \
--cc=ulf.hansson@linaro.org \
/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®