drm/amd/display: prevent memory leak
authorgehao <gehao@kylinos.cn>
Wed, 26 Oct 2022 09:54:05 +0000 (17:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Oct 2022 19:12:08 +0000 (15:12 -0400)
commitd232afb1f3417ae8194ccf19ad3a8360e70e104e
tree393c3897614d6119e7432fb720d58c4feb5dbd34
parent58ddbecb14c792b7fe0d92ae5e25c9179d62ff25
drm/amd/display: prevent memory leak

In dce6(0,1,4)_create_resource_pool and dce80_create_resource_pool
the allocated memory should be released if construct pool fails.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: gehao <gehao@kylinos.cn>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.c
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c