]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:20:51 +0000 (17:20 +0200)
commit4efe9e15978ee0ee7c4c3611a0f14efa664a964d
tree1c1939a22d9ca020d2cafb9c9007efaad6c3a0bc
parentba2ab7f35c1d29a00fcafe7d0f35026ae24d7d49
drm/amd: Fix an error handling mistake in psp_sw_init()

BugLink: https://bugs.launchpad.net/bugs/2037005
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c