Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <lijo.lazar@amd.com>
Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Jiang Liu and committed by
Alex Deucher
a0a455b4 a33f7f96

+3 -2
+3 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
··· 3815 3815 if (err == -ENODEV) { 3816 3816 dev_warn(adev->dev, "cap microcode does not exist, skip\n"); 3817 3817 err = 0; 3818 - goto out; 3818 + } else { 3819 + dev_err(adev->dev, "fail to initialize cap microcode\n"); 3819 3820 } 3820 - dev_err(adev->dev, "fail to initialize cap microcode\n"); 3821 + goto out; 3821 3822 } 3822 3823 3823 3824 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CAP];