drm/amd: Avoid BUG() for case of SRIOV missing IP version
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 3 Jan 2023 22:03:41 +0000 (16:03 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Jan 2023 19:32:56 +0000 (14:32 -0500)
No need to crash the kernel.  AMDGPU will now fail to probe.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index 8b53d76dfab9146385aab45d602037866271b326..c21aa8df5aae0a9f903449d08b21ae01baed10d5 100644 (file)
@@ -381,7 +381,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;