aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
diff options
context:
space:
mode:
authorGeorgiana Chelu <georgiana.chelu93@gmail.com>2017-10-17 23:22:08 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-10-19 15:27:22 -0400
commitc1537c342086ff7cf064d274db0c03f6698f77d8 (patch)
tree9d2d1f01bd182b89ef294fa6e5b65e3df11a6692 /drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
parentdrm/amd/powerplay: Don't cast kzalloc() return value (diff)
downloadlinux-dev-c1537c342086ff7cf064d274db0c03f6698f77d8.tar.xz
linux-dev-c1537c342086ff7cf064d274db0c03f6698f77d8.zip
drm/amd/powerplay: Remove useless variable
The result variable is initialized at the beginning of the function, but its value does not change during the function execution. Thus, remove the variable and return the SUCCESS value, which is 0. Issue found by coccinelle script: * Unneeded variable: "result". Return "0" Path to the cocci script: scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
index d968c3834481..769ac11a9215 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
@@ -1174,7 +1174,6 @@ int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr)
static int vega10_pp_tables_uninitialize(struct pp_hwmgr *hwmgr)
{
- int result = 0;
struct phm_ppt_v2_information *pp_table_info =
(struct phm_ppt_v2_information *)(hwmgr->pptable);
@@ -1217,7 +1216,7 @@ static int vega10_pp_tables_uninitialize(struct pp_hwmgr *hwmgr)
kfree(hwmgr->pptable);
hwmgr->pptable = NULL;
- return result;
+ return 0;
}
const struct pp_table_func vega10_pptable_funcs = {