]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo
authorAlice Wong <shiwei.wong@amd.com>
Mon, 2 May 2022 15:40:18 +0000 (11:40 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 May 2022 14:01:53 +0000 (10:01 -0400)
commit0ceea60e32f604c282c07defec451116dce630d5
treea0f450219cb714ee15fbf3ee7bc4f84cd339df0d
parentbeb8c0c7e21241534b2e1c6f3fce528606c6a96b
drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo

When psp_hw_init failed, it will set the load_type to AMDGPU_FW_LOAD_DIRECT.
During amdgpu_device_ip_fini, amdgpu_ucode_free_bo checks that load_type is
AMDGPU_FW_LOAD_DIRECT and skips deallocating fw_buf causing memory leak.
Remove load_type check in amdgpu_ucode_free_bo.

Signed-off-by: Alice Wong <shiwei.wong@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c