[lkml]   [2019]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.20 39/50] drm/amd/powerplay: Fix missing break in switch
4.20-stable review patch.  If anyone has any objections, please let me know.


From: Gustavo A. R. Silva <>

commit 2f10d823739680d2477ce34437e8a08a53117f40 upstream.

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

Fixes: cd70f3d6e3fa ("drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch")
Signed-off-by: Gustavo A. R. Silva <>
Signed-off-by: Alex Deucher <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
@@ -1005,6 +1005,7 @@ static int smu10_get_clock_by_type_with_
case amd_pp_dpp_clock:
pclk_vol_table = pinfo->vdd_dep_on_dppclk;
+ break;
return -EINVAL;

 \ /
  Last update: 2019-02-13 19:47    [W:0.176 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site