From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98665C072A2 for ; Wed, 15 Nov 2023 19:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234980AbjKOTm2 (ORCPT ); Wed, 15 Nov 2023 14:42:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234993AbjKOTm1 (ORCPT ); Wed, 15 Nov 2023 14:42:27 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C167412C for ; Wed, 15 Nov 2023 11:42:24 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44FB0C433CB; Wed, 15 Nov 2023 19:42:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700077344; bh=Tvsy450rhV6Wjp6MoZ6EEpUGKNhtVw2S72yij9AgrWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W0/Q/1NtFpQiLGjlOmkg8P6xMRd7GU0Ho2y3ofEade9ASo7fROZ62cjr8QEbQMq1F XfIBBOL0QiR/0sKoem+QaKemrme7YMwtSrEDcQEWiVCDdmvBQrqytiH8zvtioCyiC8 OT9RXn0FjkGTV+zkKrQ8P3G/j66a5P4GvCrkCf8w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Cong Liu , Harry Wentland , Alex Deucher , Sasha Levin Subject: [PATCH 6.6 245/603] drm/amd/display: Fix null pointer dereference in error message Date: Wed, 15 Nov 2023 14:13:10 -0500 Message-ID: <20231115191630.188500163@linuxfoundation.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231115191613.097702445@linuxfoundation.org> References: <20231115191613.097702445@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cong Liu [ Upstream commit 0c3601a2fbfb265ce283651480e30c8e60459112 ] This patch fixes a null pointer dereference in the error message that is printed when the Display Core (DC) fails to initialize. The original message includes the DC version number, which is undefined if the DC is not initialized. Fixes: 9788d087caff ("drm/amd/display: improve the message printed when loading DC") Signed-off-by: Cong Liu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 868946dd7ef12..4120ae9d10248 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1692,8 +1692,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) DRM_INFO("Display Core v%s initialized on %s\n", DC_VER, dce_version_to_string(adev->dm.dc->ctx->dce_version)); } else { - DRM_INFO("Display Core v%s failed to initialize on %s\n", DC_VER, - dce_version_to_string(adev->dm.dc->ctx->dce_version)); + DRM_INFO("Display Core failed to initialize with v%s!\n", DC_VER); goto error; } -- 2.42.0