mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
drm/exec: Use kvmalloc_objs for exec->objects
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 <jonathan.cavitt@intel.com> Cc: Rob Clark <robdclark@chromium.org> Cc: Christian König <christian.koenig@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patch.msgid.link/20260701172458.1416930-1-jonathan.cavitt@intel.com
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user