[PATCH] drm/amdgpu: Remove the redundant NULL check for the 'dte_data' object
From: Ваторопин Андрей
Date: Wed Mar 26 2025 - 02:01:54 EST
From: Andrey Vatoropin <a.vatoropin@xxxxxxx>
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@xxxxxxx>
---
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