From a8eba56abcadca67bb4b717d9ea8ebdc703fb111 Mon Sep 17 00:00:00 2001 From: Jonathan Cavitt Date: Thu, 2 Jul 2026 01:24:58 +0800 Subject: [PATCH] drm/exec: Use kvmalloc_objs for exec->objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use kvmalloc_objs instead of kvmalloc_array when initializing exec->objects in drm_exec_init. Concern caught by static analysis. Signed-off-by: Jonathan Cavitt Cc: Rob Clark Cc: Christian König Reviewed-by: Christian König Link: https://patch.msgid.link/20260701172458.1416930-1-jonathan.cavitt@intel.com --- drivers/gpu/drm/drm_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_exec.c b/drivers/gpu/drm/drm_exec.c index 7988f5e7d56a..fa923852fae4 100644 --- a/drivers/gpu/drm/drm_exec.c +++ b/drivers/gpu/drm/drm_exec.c @@ -79,7 +79,7 @@ void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned nr) nr = PAGE_SIZE / sizeof(void *); exec->flags = flags; - exec->objects = kvmalloc_array(nr, sizeof(void *), GFP_KERNEL); + exec->objects = kvmalloc_objs(*exec->objects, nr, GFP_KERNEL); /* If allocation here fails, just delay that till the first use */ exec->max_objects = exec->objects ? nr : 0;