From: Andrey Vatoropin <a.vatoro...@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.vatoro...@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

Reply via email to