drm/amd: Avoid BUG() for case of SRIOV missing IP version
authorjsg <jsg@openbsd.org>
Mon, 27 Mar 2023 03:48:31 +0000 (03:48 +0000)
committerjsg <jsg@openbsd.org>
Mon, 27 Mar 2023 03:48:31 +0000 (03:48 +0000)
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

index 582d50a..b4fddeb 100644 (file)
@@ -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;