[PATCH] drm/amdgpu: Remove the redundant NULL check for the 'table' object
Ваторопин Андрей
a.vatoropin at crpt.ru
Wed Apr 2 15:05:55 UTC 2025
From: Andrey Vatoropin <a.vatoropin at crpt.ru>
Static analysis shows that pointer "table" cannot be NULL because it
points to the object "struct amdgpu_cac_leakage_table".
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 at crpt.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 1c25f3023e93..d6ab6d7777f9 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
@@ -2633,9 +2633,6 @@ static int si_get_cac_std_voltage_max_min(struct amdgpu_device *adev,
u32 i;
u32 v0_loadline;
- if (table == NULL)
- return -EINVAL;
-
*max = 0;
*min = 0xFFFF;
--
2.43.0
More information about the amd-gfx
mailing list