From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA607BA48 for ; Tue, 7 Mar 2023 18:29:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14254C433A1; Tue, 7 Mar 2023 18:29:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678213789; bh=1YbItznJEmgglrfzidw+JXKVEAmyLXvaYxvdXQasq7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UFWDOw6UFYF8PcrOIwC6Us42wtq6dWszP82z1iY5E8cArGau4c/xEPR4dRMKc7f7h 5uK6i+mWWbPRNRVWkL/yc9FaMRUIWpZ6N0lsPAmRoUD9JICpoRyqFPiZPufJOcm0Qt ty43ynFKGYQNjXyZv1neLK2iMeq9A0ewc5x6H1pk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alex Deucher , Lijo Lazar , Mario Limonciello , Sasha Levin Subject: [PATCH 6.1 602/885] drm/amd: Avoid BUG() for case of SRIOV missing IP version Date: Tue, 7 Mar 2023 17:58:56 +0100 Message-Id: <20230307170028.508391328@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170001.594919529@linuxfoundation.org> References: <20230307170001.594919529@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Mario Limonciello [ Upstream commit 93fec4f8c158584065134b4d45e875499bf517c8 ] No need to crash the kernel. AMDGPU will now fail to probe. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 712dd72f3ccf2..087147f09933a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/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.39.2