Commit 616ae02f authored by Ernst Sjöstrand's avatar Ernst Sjöstrand Committed by Alex Deucher

drm/amd/amdgpu: Fix amdgpu_set_pp_od_clk_voltage error check

Reported by smatch:
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:693 amdgpu_set_pp_od_clk_voltage() error: uninitialized symbol 'ret'.
Signed-off-by: default avatarErnst Sjöstrand <ernstp@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0172591e
...@@ -689,12 +689,12 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev, ...@@ -689,12 +689,12 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev,
if (ret) if (ret)
return -EINVAL; return -EINVAL;
} else { } else {
if (adev->powerplay.pp_funcs->odn_edit_dpm_table) if (adev->powerplay.pp_funcs->odn_edit_dpm_table) {
ret = amdgpu_dpm_odn_edit_dpm_table(adev, type, ret = amdgpu_dpm_odn_edit_dpm_table(adev, type,
parameter, parameter_size); parameter, parameter_size);
if (ret)
if (ret) return -EINVAL;
return -EINVAL; }
if (type == PP_OD_COMMIT_DPM_TABLE) { if (type == PP_OD_COMMIT_DPM_TABLE) {
if (adev->powerplay.pp_funcs->dispatch_tasks) { if (adev->powerplay.pp_funcs->dispatch_tasks) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment