diff mbox series

drm/amdgpu: Remove the redundant NULL check for the 'dte_data' object

Message ID 20250326060059.15335-1-a.vatoropin@crpt.ru (mailing list archive)
State New
Headers show
Series drm/amdgpu: Remove the redundant NULL check for the 'dte_data' object | expand

Commit Message

Ваторопин Андрей March 26, 2025, 6:01 a.m. UTC
From: Andrey Vatoropin <a.vatoropin@crpt.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@crpt.ru>
---
 drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

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;