drm/amd/display: Fix harmless type mismatch in allocation

While converting to kmalloc_obj() API, a type assignment mismatch was
found between the desired struct dcn42_resource_pool and the allocated
struct dcn401_resource_pool. Fix the type (it is harmless: the objects
have the same contents and size).

Signed-off-by: Kees Cook <kees@kernel.org>
---
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Rodrigo Siqueira <siqueira@igalia.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Dan Wheeler <daniel.wheeler@amd.com>
Cc: Roman Li <Roman.Li@amd.com>
Cc: Ovidiu Bunea <ovidiu.bunea@amd.com>
Cc: Charlene Liu <Charlene.Liu@amd.com>
Cc: Leo Chen <leo.chen@amd.com>
Cc: Ivan Lipski <ivan.lipski@amd.com>
Cc: Gaghik Khachatrian <gaghik.khachatrian@amd.com>
Cc: <amd-gfx@lists.freedesktop.org>
Cc: <dri-devel@lists.freedesktop.org>
This commit is contained in:
Kees Cook 2026-09-03 11:05:58 -07:00
parent 986c24e0fe
commit 90feea391c

View File

@ -2441,7 +2441,7 @@ struct resource_pool *dcn42_create_resource_pool(
struct dc *dc)
{
struct dcn42_resource_pool *pool =
kzalloc(sizeof(struct dcn401_resource_pool), GFP_KERNEL);
kzalloc(sizeof(struct dcn42_resource_pool), GFP_KERNEL);
if (!pool)
return NULL;