Message ID | 79db6271-a752-579e-df68-d9c917b9006a@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 610e0d6d93bb..4af77d790ae0 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1558,8 +1558,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes) end_offset = (int)(long)end_virt_addr & (PAGE_SIZE - 1); num_pages = (offset + num_bytes + PAGE_SIZE - 1) / PAGE_SIZE; - - pages = kmalloc(sizeof(struct page *) * num_pages, GFP_KERNEL); + pages = kmalloc_array(num_pages, sizeof(*pages), GFP_KERNEL); if (pages == NULL) { vchiq_log_error(vchiq_arm_log_level, "Unable to allocation memory for %d pages\n",