]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:55 +0000 (09:33 +0100)
[ Upstream commit 93fec4f8c158584065134b4d45e875499bf517c8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index 712dd72f3ccf24796926078e9b08022213244f55..087147f09933aa6f20698a6fd3fcc8729a097ddb 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;