summaryrefslogtreecommitdiff
path: root/mm/mempool.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mempool.c')
-rw-r--r--mm/mempool.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/mempool.c b/mm/mempool.c
index c290e5261b47..c22c63ccbbcd 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -371,8 +371,7 @@ int mempool_resize(struct mempool *pool, int new_min_nr)
spin_unlock_irqrestore(&pool->lock, flags);
/* Grow the pool */
- new_elements = kmalloc_array(new_min_nr, sizeof(*new_elements),
- GFP_KERNEL);
+ new_elements = kmalloc_objs(*new_elements, new_min_nr, GFP_KERNEL);
if (!new_elements)
return -ENOMEM;