All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: Change kzalloc to kcalloc
@ 2014-07-23 23:03 Nicholas Krause
  2014-07-23 23:07 ` David Rientjes
                   ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Nicholas Krause @ 2014-07-23 23:03 UTC (permalink / raw)
  To: gregkh
  Cc: john.stultz, paul.gortmaker, gang.chen.5i5j, yongjun_wei,
	dan.carpenter, tomas.winkler, devel, linux-kernel

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);
 	if (!heaps)
 		return -ENOMEM;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2014-07-25  4:34 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-23 23:03 [PATCH] staging: Change kzalloc to kcalloc Nicholas Krause
2014-07-23 23:07 ` David Rientjes
2014-07-23 23:08 ` Richard Weinberger
2014-07-24 14:47 ` Steven Rostedt
2014-07-24 14:51   ` Steven Rostedt
2014-07-24 16:15     ` Måns Rullgård
2014-07-24 16:31       ` Nick Krause
2014-07-24 16:34         ` Måns Rullgård
2014-07-24 16:35           ` Nick Krause
2014-07-24 16:47             ` Måns Rullgård
2014-07-24 16:50               ` Nick Krause
2014-07-24 17:18                 ` Steven Rostedt
2014-07-24 17:30                   ` Harvey Harrison
2014-07-24 17:48                     ` Steven Rostedt
2014-07-24 18:41                       ` Nick Krause
2014-07-24 18:49                         ` Richard Weinberger
2014-07-24 18:55                           ` Nick Krause
2014-07-24 19:05                             ` Nick Krause
2014-07-24 19:11                               ` Richard Weinberger
2014-07-25  2:15                                 ` Chen Gang
2014-07-25  2:20                                   ` Nick Krause
2014-07-25  2:47                                     ` Chen Gang
2014-07-25  2:53                                       ` Nick Krause
2014-07-25  3:09                                         ` Chen Gang
2014-07-25  3:13                                           ` Nick Krause
2014-07-25  3:21                                             ` Chen Gang
2014-07-25  3:30                                               ` Nick Krause
2014-07-25  3:34                                                 ` Chen Gang
2014-07-25  3:39                                                   ` Nick Krause
2014-07-25  4:33                                                     ` Chen Gang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.