aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authoryalin wang <yalin.wang2010@gmail.com>2015-11-12 06:27:11 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2015-12-22 05:32:05 -0500
commit1ff8950c04331883b11c5e0d6db96e2da8b6f8c9 (patch)
treefecd9cfa6af00958071a530b8ac1dec299d11daf /drivers/mmc
parent6e1bbc51439705b834688c592e13dfa82e32ff04 (diff)
mmc: block: change to use kmalloc when copy data from userspace
Use kmalloc instead of kzalloc, as zeroing the memory isn't needed. Signed-off-by: yalin wang <yalin.wang2010@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index d8486168415a..ce38960cca12 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -344,7 +344,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
344 struct mmc_blk_ioc_data *idata; 344 struct mmc_blk_ioc_data *idata;
345 int err; 345 int err;
346 346
347 idata = kzalloc(sizeof(*idata), GFP_KERNEL); 347 idata = kmalloc(sizeof(*idata), GFP_KERNEL);
348 if (!idata) { 348 if (!idata) {
349 err = -ENOMEM; 349 err = -ENOMEM;
350 goto out; 350 goto out;
@@ -364,7 +364,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
364 if (!idata->buf_bytes) 364 if (!idata->buf_bytes)
365 return idata; 365 return idata;
366 366
367 idata->buf = kzalloc(idata->buf_bytes, GFP_KERNEL); 367 idata->buf = kmalloc(idata->buf_bytes, GFP_KERNEL);
368 if (!idata->buf) { 368 if (!idata->buf) {
369 err = -ENOMEM; 369 err = -ENOMEM;
370 goto idata_err; 370 goto idata_err;