]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd: Fix an error handling mistake in psp_sw_init()
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 13 Jul 2023 05:14:59 +0000 (00:14 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:22:39 +0000 (10:22 +0200)
commitbd79de8bd3718dbea51e13615010df5db6b49174
treea762de4f6a5f26760ee8402c06cde6fcc051a9a5
parent4e1c1d742970d65f1551a455a780c17a61ce4251
drm/amd: Fix an error handling mistake in psp_sw_init()

[ Upstream commit c01aebeef3ce45f696ffa0a1303cea9b34babb45 ]

If the second call to amdgpu_bo_create_kernel() fails, the memory
allocated from the first call should be cleared.  If the third call
fails, the memory from the second call should be cleared.

Fixes: b95b5391684b ("drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c