Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758515AbaGWXIs (ORCPT ); Wed, 23 Jul 2014 19:08:48 -0400 Received: from mail-vc0-f170.google.com ([209.85.220.170]:61423 "EHLO mail-vc0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbaGWXIr (ORCPT ); Wed, 23 Jul 2014 19:08:47 -0400 MIME-Version: 1.0 In-Reply-To: <1406156581-6052-1-git-send-email-xerofoify@gmail.com> References: <1406156581-6052-1-git-send-email-xerofoify@gmail.com> Date: Thu, 24 Jul 2014 01:08:46 +0200 Message-ID: Subject: Re: [PATCH] staging: Change kzalloc to kcalloc From: Richard Weinberger To: Nicholas Krause Cc: Greg KH , John Stultz , Paul Gortmaker , Chen Gang , Wei Yongjun , Dan Carpenter , tomas.winkler@intel.com, devel@driverdev.osuosl.org, LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 24, 2014 at 1:03 AM, Nicholas Krause wrote: > This changes the call to kzalloc to kcalloc in ion_dummy_driver > for allocating the heap. > > Signed-off-by: Nicholas Krause > --- > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/