Skip to content

Commit 2f10d82

Browse files
GustavoARSilvaalexdeucher
authored andcommitted
drm/amd/powerplay: Fix missing break in switch
Add missing break statement in order to prevent the code from falling through to the default case. The resoning for this is that pclk_vol_table is an automatic variable. So, it makes no sense to update it just before falling through to the default case and return -EINVAL. This bug was found thanks to the ongoing efforts to enabling -Wimplicit-fallthrough. Fixes: cd70f3d ("drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent afeff4c commit 2f10d82

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,7 @@ static int smu10_get_clock_by_type_with_latency(struct pp_hwmgr *hwmgr,
10331033
break;
10341034
case amd_pp_dpp_clock:
10351035
pclk_vol_table = pinfo->vdd_dep_on_dppclk;
1036+
break;
10361037
default:
10371038
return -EINVAL;
10381039
}

0 commit comments

Comments
 (0)