lkml.org 
[lkml]   [2014]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[linux-next PATCH] staging: android: ion: fix prefer kcalloc over kzalloc with multiply
Date
Fix checkpatch warning of prefer kcalloc over kzalloc with multiply,
found under drivers/staging/android/ion/.

Signed-off-by: WANG Chao <wangchao19890207@gmail.com>
---
drivers/staging/android/ion/ion_dummy_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c
index 3a45e79..6d0a38a 100644
--- a/drivers/staging/android/ion/ion_dummy_driver.c
+++ b/drivers/staging/android/ion/ion_dummy_driver.c
@@ -68,7 +68,7 @@ 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,
+ heaps = kcalloc(dummy_ion_pdata.nr, sizeof(struct ion_heap *),
GFP_KERNEL);
if (!heaps)
return -ENOMEM;
--
1.9.3


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