浏览代码

fs/ramfs/file-nommu.c: replace count*size kzalloc by kcalloc

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fabian Frederick 11 年之前
父节点
当前提交
6f4535ed7d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/ramfs/file-nommu.c

+ 1 - 1
fs/ramfs/file-nommu.c

@@ -222,7 +222,7 @@ static unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
 
 	/* gang-find the pages */
 	ret = -ENOMEM;
-	pages = kzalloc(lpages * sizeof(struct page *), GFP_KERNEL);
+	pages = kcalloc(lpages, sizeof(struct page *), GFP_KERNEL);
 	if (!pages)
 		goto out_free;