drm/amd/powerplay: Remove unneeded variable 'result' in vega10_hwmgr.c
authorzhengbin <zhengbin13@huawei.com>
Wed, 27 Nov 2019 09:33:39 +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/vega10_hwmgr.c:4363:5-11: Unneeded variable: "result". Return "0" on line 4370

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/vega10_hwmgr.c

index b29e996..4685193 100644 (file)
@@ -4360,14 +4360,13 @@ static int vega10_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr,
        struct vega10_hwmgr *data = hwmgr->backend;
        struct dm_pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges = clock_range;
        Watermarks_t *table = &(data->smc_state_table.water_marks_table);
-       int result = 0;
 
        if (!data->registry_data.disable_water_mark) {
                smu_set_watermarks_for_clocks_ranges(table, wm_with_clock_ranges);
                data->water_marks_bitmap = WaterMarksExist;
        }
 
-       return result;
+       return 0;
 }
 
 static int vega10_get_ppfeature_status(struct pp_hwmgr *hwmgr, char *buf)