From: Mario Limonciello Date: Tue, 3 Jan 2023 22:03:41 +0000 (-0600) Subject: drm/amd: Avoid BUG() for case of SRIOV missing IP version X-Git-Tag: v6.1.16~288 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=12003ad0f35c946e8e05a8ed9069486ec36c6694;p=users%2Fdwmw2%2Flinux.git drm/amd: Avoid BUG() for case of SRIOV missing IP version [ Upstream commit 93fec4f8c158584065134b4d45e875499bf517c8 ] No need to crash the kernel. AMDGPU will now fail to probe. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 712dd72f3ccf2..087147f09933a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -354,7 +354,7 @@ static int psp_init_sriov_microcode(struct psp_context *psp) adev->virt.autoload_ucode_id = AMDGPU_UCODE_ID_CP_MES1_DATA; break; default: - BUG(); + ret = -EINVAL; break; } return ret;