lkml.org 
[lkml]   [2014]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] staging: Change kzalloc to kcalloc
From
On Thu, Jul 24, 2014 at 1:03 AM, Nicholas Krause <xerofoify@gmail.com> wrote:
> This changes the call to kzalloc to kcalloc in ion_dummy_driver
> for allocating the heap.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
> drivers/staging/android/ion/ion_dummy_driver.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c
> index 3a45e79..8883432 100644
> --- a/drivers/staging/android/ion/ion_dummy_driver.c
> +++ b/drivers/staging/android/ion/ion_dummy_driver.c
> @@ -67,9 +67,8 @@ static int __init ion_dummy_init(void)
> {
> int i, err;
>
> idev = ion_device_create(NULL);
> - heaps = kzalloc(sizeof(struct ion_heap *) * dummy_ion_pdata.nr,
> - GFP_KERNEL);
> + heaps = kcalloc(*dummy_ion_pdata.nr , sizeof((struct ion_heap *) *dummy_ion_pdata.nr) , GFP_KERNEL);

Nick, please go away.
Your patches are threat to Linux.

--
Thanks,
//richard


\
 
 \ /
  Last update: 2014-07-24 01:41    [W:1.140 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site