diff options
| author | Alice Wong <[email protected]> | 2022-05-02 15:40:18 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-05-04 14:01:53 +0000 |
| commit | ab0cd4a9ae5b4679b714d8dbfedc0901fecdce9f (patch) | |
| tree | a0f450219cb714ee15fbf3ee7bc4f84cd339df0d /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |
| parent | drm/amd/display: Fix null pointer exception while load amdgpu (diff) | |
| download | kernel-ab0cd4a9ae5b4679b714d8dbfedc0901fecdce9f.tar.gz kernel-ab0cd4a9ae5b4679b714d8dbfedc0901fecdce9f.zip | |
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 <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index 6218bd62d172..62ce16c77d13 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c @@ -787,8 +787,7 @@ int amdgpu_ucode_create_bo(struct amdgpu_device *adev) void amdgpu_ucode_free_bo(struct amdgpu_device *adev) { - if (adev->firmware.load_type != AMDGPU_FW_LOAD_DIRECT) - amdgpu_bo_free_kernel(&adev->firmware.fw_buf, + amdgpu_bo_free_kernel(&adev->firmware.fw_buf, &adev->firmware.fw_buf_mc, &adev->firmware.fw_buf_ptr); } |
