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 <[email protected]> Cc: Rob Clark <[email protected]> Cc: Christian König <[email protected]> --- 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; -- 2.53.0
