diff options
| author | Jiang Liu <[email protected]> | 2025-02-07 06:28:51 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-02-13 00:47:15 +0000 |
| commit | a0a455b4bc7483ad60e8b8a50330c1e05bb7bfcf (patch) | |
| tree | f32ea1e81366873d29eacde40ffc38ec3de0e071 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
| parent | amdkfd: properly free gang_ctx_bo when failed to init user queue (diff) | |
| download | kernel-a0a455b4bc7483ad60e8b8a50330c1e05bb7bfcf.tar.gz kernel-a0a455b4bc7483ad60e8b8a50330c1e05bb7bfcf.zip | |
drm/amdgpu: bail out when failed to load fw in psp_init_cap_microcode()
In function psp_init_cap_microcode(), it should bail out when failed to
load firmware, otherwise it may cause invalid memory access.
Fixes: 07dbfc6b102e ("drm/amd: Use `amdgpu_ucode_*` helpers for PSP")
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index babe94ade247..e5fc80ed06ea 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -3815,9 +3815,10 @@ int psp_init_cap_microcode(struct psp_context *psp, const char *chip_name) if (err == -ENODEV) { dev_warn(adev->dev, "cap microcode does not exist, skip\n"); err = 0; - goto out; + } else { + dev_err(adev->dev, "fail to initialize cap microcode\n"); } - dev_err(adev->dev, "fail to initialize cap microcode\n"); + goto out; } info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CAP]; |
