]> Git Repo - linux.git/commitdiff
drm/amd/powerplay: Remove useless variable
authorGeorgiana Chelu <[email protected]>
Tue, 17 Oct 2017 20:22:08 +0000 (23:22 +0300)
committerAlex Deucher <[email protected]>
Thu, 19 Oct 2017 19:27:22 +0000 (15:27 -0400)
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 <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c

index d968c3834481c11d9002f4e01e57c488f84b022e..769ac11a92158bcd0307581038d6c6bf37f9baac 100644 (file)
@@ -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 = {
This page took 0.063509 seconds and 4 git commands to generate.