summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_memory.c')
-rw-r--r--drivers/gpu/drm/drm_memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
index 3c54044214db..d69e4fc1ee77 100644
--- a/drivers/gpu/drm/drm_memory.c
+++ b/drivers/gpu/drm/drm_memory.c
@@ -80,7 +80,7 @@ static void *agp_remap(unsigned long offset, unsigned long size,
* page-table instead (that's probably faster anyhow...).
*/
/* note: use vmalloc() because num_pages could be large... */
- page_map = vmalloc(num_pages * sizeof(struct page *));
+ page_map = vmalloc(array_size(num_pages, sizeof(struct page *)));
if (!page_map)
return NULL;