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: 07dbfc6b10
("drm/amd: Use `amdgpu_ucode_*` helpers for PSP")
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
a33f7f9660
commit
a0a455b4bc
1 changed files with 3 additions and 2 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue