From ff3506284f1a4bcc45c48f968feed22c4acae5da Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 27 Mar 2023 03:48:31 +0000 Subject: [PATCH] drm/amd: Avoid BUG() for case of SRIOV missing IP version From Mario Limonciello 12003ad0f35c946e8e05a8ed9069486ec36c6694 in linux-6.1.y/6.1.16 93fec4f8c158584065134b4d45e875499bf517c8 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c index 582d50a360b..b4fddeb26cb 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c +++ b/sys/dev/pci/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; -- 2.20.1