diff options
Diffstat (limited to 'fs/pstore')
-rw-r--r-- | fs/pstore/ram_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 34a1e5aa848c..9d7b9a83699e 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c | |||
@@ -394,7 +394,7 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size) | |||
394 | 394 | ||
395 | prot = pgprot_noncached(PAGE_KERNEL); | 395 | prot = pgprot_noncached(PAGE_KERNEL); |
396 | 396 | ||
397 | pages = kmalloc(sizeof(struct page *) * page_count, GFP_KERNEL); | 397 | pages = kmalloc_array(page_count, sizeof(struct page *), GFP_KERNEL); |
398 | if (!pages) { | 398 | if (!pages) { |
399 | pr_err("%s: Failed to allocate array for %u pages\n", | 399 | pr_err("%s: Failed to allocate array for %u pages\n", |
400 | __func__, page_count); | 400 | __func__, page_count); |