From: jsg Date: Mon, 27 Mar 2023 03:48:31 +0000 (+0000) Subject: drm/amd: Avoid BUG() for case of SRIOV missing IP version X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ff3506284f1a4bcc45c48f968feed22c4acae5da;p=openbsd 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 --- 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;