Skip to content

Commit

Permalink
drm/amd/powerplay: Remove useless variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Georgiana Chelu authored and Alex Deucher committed Oct 19, 2017
1 parent bada22d commit c1537c3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit c1537c3

Please sign in to comment.