From: Dan Carpenter Date: Mon, 3 Apr 2017 18:41:47 +0000 (+0300) Subject: drm/amd/powerplay: fix pp_dpm_get_current_power_state() (v2) X-Git-Tag: v5.15~11060^2~18^2~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f987cd0d78ead344a07c6fe215234f3be51d051;p=platform%2Fkernel%2Flinux-starfive.git drm/amd/powerplay: fix pp_dpm_get_current_power_state() (v2) This switch statement is missing breaks. v2: agd: break in default case as well Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 6f0ed07bb587..07dbeb225df7 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -539,15 +539,19 @@ static enum amd_pm_state_type pp_dpm_get_current_power_state(void *handle) switch (state->classification.ui_label) { case PP_StateUILabel_Battery: pm_type = POWER_STATE_TYPE_BATTERY; + break; case PP_StateUILabel_Balanced: pm_type = POWER_STATE_TYPE_BALANCED; + break; case PP_StateUILabel_Performance: pm_type = POWER_STATE_TYPE_PERFORMANCE; + break; default: if (state->classification.flags & PP_StateClassificationFlag_Boot) pm_type = POWER_STATE_TYPE_INTERNAL_BOOT; else pm_type = POWER_STATE_TYPE_DEFAULT; + break; } mutex_unlock(&pp_handle->pp_lock);