From nobody Wed Dec 31 03:30:39 2025 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 118C8C4332F for ; Tue, 14 Nov 2023 06:43:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232117AbjKNGn7 (ORCPT ); Tue, 14 Nov 2023 01:43:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbjKNGn5 (ORCPT ); Tue, 14 Nov 2023 01:43:57 -0500 Received: from 8.mo584.mail-out.ovh.net (8.mo584.mail-out.ovh.net [188.165.33.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C4EC19B for ; Mon, 13 Nov 2023 22:43:53 -0800 (PST) Received: from director9.ghost.mail-out.ovh.net (unknown [10.108.20.161]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 5967D28496 for ; Tue, 14 Nov 2023 06:36:58 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-xkfk5 (unknown [10.110.208.213]) by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 7942A1FDCE; Tue, 14 Nov 2023 06:36:55 +0000 (UTC) Received: from foxhound.fi ([37.59.142.99]) by ghost-submission-6684bf9d7b-xkfk5 with ESMTPSA id ONtBGYcVU2XrtQYAFz0/+Q (envelope-from ); Tue, 14 Nov 2023 06:36:55 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-99G00388b5308c-d874-4d8f-9cc7-23e6befe93bc, 39B655737E19CE8DAD14488E69459E8CEBC9C448) smtp.auth=jose.pekkarinen@foxhound.fi X-OVh-ClientIp: 83.100.46.156 From: =?UTF-8?q?Jos=C3=A9=20Pekkarinen?= To: harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, skhan@linuxfoundation.org Cc: =?UTF-8?q?Jos=C3=A9=20Pekkarinen?= , airlied@gmail.com, daniel@ffwll.ch, Wayne.Lin@amd.com, qingqing.zhuo@amd.com, lyude@redhat.com, aurabindo.pillai@amd.com, sungjoon.kim@amd.com, srinivasan.shanmugam@amd.com, hamza.mahfooz@amd.com, mikita.lipski@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linux.dev Subject: [PATCH] drm/amd/display: fix NULL dereference Date: Tue, 14 Nov 2023 08:36:46 +0200 Message-Id: <20231114063647.71929-1-jose.pekkarinen@foxhound.fi> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 1552053025768449729 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrudefuddgleekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffogggtgfesthekredtredtjeenucfhrhhomheplfhoshorucfrvghkkhgrrhhinhgvnhcuoehjohhsvgdrphgvkhhkrghrihhnvghnsehfohighhhouhhnugdrfhhiqeenucggtffrrghtthgvrhhnpeeftdelueetieetvdettdetueeivedujeefffdvteefkeelhefhleelfeetteejjeenucfkphepuddvjedrtddrtddruddpkeefrddutddtrdegiedrudehiedpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeojhhoshgvrdhpvghkkhgrrhhinhgvnhesfhhogihhohhunhgurdhfiheqpdhnsggprhgtphhtthhopedupdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdfovfetjfhoshhtpehmohehkeegpdhmohguvgepshhmthhpohhuth Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following patch will fix a minor issue where a debug message is referencing an struct that has just being checked whether is null or not. This has been noticed by using coccinelle, in the following output: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c:540:25-29: ERROR:= aconnector is NULL but dereferenced. Fixes: 5d72e247e58c9 ("drm/amd/display: switch DC over to the new DRM loggi= ng macros") Signed-off-by: Jos=C3=A9 Pekkarinen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/dr= ivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c index ed784cf27d39..7048dab5e356 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c @@ -537,8 +537,7 @@ bool dm_helpers_dp_read_dpcd( struct amdgpu_dm_connector *aconnector =3D link->priv; =20 if (!aconnector) { - drm_dbg_dp(aconnector->base.dev, - "Failed to find connector for link!\n"); + DRM_ERROR("Failed to find connector for link!"); return false; } =20 --=20 2.39.2