lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250326060059.15335-1-a.vatoropin@crpt.ru>
Date: Wed, 26 Mar 2025 06:01:19 +0000
From: Ваторопин Андрей
	<a.vatoropin@...t.ru>
To: Kenneth Feng <kenneth.feng@....com>
CC: Ваторопин Андрей
	<a.vatoropin@...t.ru>, Alex Deucher <alexander.deucher@....com>,
	Christian König <christian.koenig@....com>, David Airlie
	<airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Sunil Khatri
	<sunil.khatri@....com>, Jesse Zhang <jesse.zhang@....com>, Tim Huang
	<tim.huang@....com>, Boyuan Zhang <boyuan.zhang@....com>, "chr[]"
	<chris@...orff.com>, Yang Wang <kevinyang.wang@....com>,
	"amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"lvc-project@...uxtesting.org" <lvc-project@...uxtesting.org>
Subject: [PATCH] drm/amdgpu: Remove the redundant NULL check for the
 'dte_data' object

From: Andrey Vatoropin <a.vatoropin@...t.ru>

Static analysis shows that pointer "dte_data" cannot be NULL because it 
points to the object "struct si_dte_data".

Remove the extra NULL check. It is meaningless and harms the readability
of the code.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Andrey Vatoropin <a.vatoropin@...t.ru>
---
 drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
index d6dfe2599ebe..32e6a815e609 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
@@ -2567,9 +2567,6 @@ static int si_initialize_smc_dte_tables(struct amdgpu_device *adev)
 	u8 tdep_count;
 	u32 i;
 
-	if (dte_data == NULL)
-		si_pi->enable_dte = false;
-
 	if (si_pi->enable_dte == false)
 		return 0;
 
-- 
2.43.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ