Merge tag 'fsi-updates-2018-07-12' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / android / binder_alloc.c
index 4f382d5..2628806 100644 (file)
@@ -692,8 +692,8 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
                }
        }
 #endif
-       alloc->pages = kzalloc(sizeof(alloc->pages[0]) *
-                                  ((vma->vm_end - vma->vm_start) / PAGE_SIZE),
+       alloc->pages = kcalloc((vma->vm_end - vma->vm_start) / PAGE_SIZE,
+                              sizeof(alloc->pages[0]),
                               GFP_KERNEL);
        if (alloc->pages == NULL) {
                ret = -ENOMEM;