lkml.org 
[lkml]   [2015]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] mmc: change to use kmalloc
Hi Yalin,

On Wed, Nov 11, 2015 at 9:53 AM, yalin wang <yalin.wang2010@gmail.com> wrote:
> Use kmalloc instead of kzalloc, zero the memory is not needed.
>
why you want to do this? what problem you faces, and how this resolves the same?

> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
> ---
> drivers/mmc/card/block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 23b6c8e..975cd3e 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
Regards,
Alim


\
 
 \ /
  Last update: 2015-11-11 18:21    [W:0.050 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site