drm/amd/powerplay: Remove unneeded variable 'ret' in smu7_hwmgr.c
authorzhengbin <zhengbin13@huawei.com>
Wed, 27 Nov 2019 09:33:40 +0000 (17:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Dec 2019 22:55:08 +0000 (17:55 -0500)
Fixes coccicheck warning:

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:5188:5-8: Unneeded variable: "ret". Return "0" on line 5196

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c

index c3f5866..d70abad 100644 (file)
@@ -5185,13 +5185,11 @@ uint8_t smu7_get_sleep_divider_id_from_clock(uint32_t clock,
 
 int smu7_init_function_pointers(struct pp_hwmgr *hwmgr)
 {
-       int ret = 0;
-
        hwmgr->hwmgr_func = &smu7_hwmgr_funcs;
        if (hwmgr->pp_table_version == PP_TABLE_V0)
                hwmgr->pptable_func = &pptable_funcs;
        else if (hwmgr->pp_table_version == PP_TABLE_V1)
                hwmgr->pptable_func = &pptable_v1_0_funcs;
 
-       return ret;
+       return 0;
 }