Skip to contentSkip to conversation

staging: android: ion: fix prefer kcalloc over kzalloc with multiply

PATCH New WANG Chao 1 participant 1 message Jul 23, 2014 Staging

lore
Share & tools
lore

WANG Chao

author
#0 lore raw

PATCH 1/1 staging: android: ion: fix prefer kcalloc over kzalloc with multiply

Fix checkpatch warning of prefer kcalloc over kzalloc with multiply, found under drivers/staging/android/ion/.

---
 drivers/staging/android/ion/ion_dummy_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/ion_dummy_driver.c +1 -1
index 3a45e79..6d0a38a 100644
@@ -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;
Signature · 1 line
1.9.3