summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/selftests/test-drm_mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/selftests/test-drm_mm.c')
-rw-r--r--drivers/gpu/drm/selftests/test-drm_mm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c
index ab6c6c9c5b5c..7027a6739845 100644
--- a/drivers/gpu/drm/selftests/test-drm_mm.c
+++ b/drivers/gpu/drm/selftests/test-drm_mm.c
@@ -579,7 +579,7 @@ static int __igt_insert(unsigned int count, u64 size, bool replace)
DRM_MM_BUG_ON(!size);
ret = -ENOMEM;
- nodes = vmalloc(count * sizeof(*nodes));
+ nodes = vmalloc(array_size(count, sizeof(*nodes)));
if (!nodes)
goto err;