[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250402150551.388229-1-a.vatoropin@crpt.ru>
Date: Wed, 2 Apr 2025 15:05:55 +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>, "chr[]" <chris@...orff.com>, Boyuan Zhang
<boyuan.zhang@....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-patches@...uxtesting.org" <lvc-patches@...uxtesting.org>
Subject: [PATCH] drm/amdgpu: Remove the redundant NULL check for the 'table'
object
From: Andrey Vatoropin <a.vatoropin@...t.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@...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 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
Powered by blists - more mailing lists