Merge tag 'fbdev-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
[firefly-linux-kernel-4.4.55.git] / fs / pstore / ram_core.c
index 34a1e5aa848ce601f4d76911d0618f8ac6469cc3..9d7b9a83699e42c23993115d01e8ace172d46df2 100644 (file)
@@ -394,7 +394,7 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size)
 
        prot = pgprot_noncached(PAGE_KERNEL);
 
-       pages = kmalloc(sizeof(struct page *) * page_count, GFP_KERNEL);
+       pages = kmalloc_array(page_count, sizeof(struct page *), GFP_KERNEL);
        if (!pages) {
                pr_err("%s: Failed to allocate array for %u pages\n",
                       __func__, page_count);