From: yalin wang Date: Thu, 12 Nov 2015 11:27:11 +0000 (+0800) Subject: mmc: block: change to use kmalloc when copy data from userspace X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1ff8950c0433;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Ulf Hansson --- 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( 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; @@ -364,7 +364,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;