summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorGustavo A. R. Silva2019-01-25 22:55:33 +0100
committerGreg Kroah-Hartman2019-02-15 08:10:12 +0100
commitb81afe37ff5598d7bbb5efa5f2ef6997a5d48e5e (patch)
tree6317284c9a3f57c376337456001b91b96a96f037 /drivers/gpu/drm/amd
parentdrm/modes: Prevent division by zero htotal (diff)
downloadkernel-qcow2-linux-b81afe37ff5598d7bbb5efa5f2ef6997a5d48e5e.tar.gz
kernel-qcow2-linux-b81afe37ff5598d7bbb5efa5f2ef6997a5d48e5e.tar.xz
kernel-qcow2-linux-b81afe37ff5598d7bbb5efa5f2ef6997a5d48e5e.zip
drm/amd/powerplay: Fix missing break in switch
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 -Wimplicit-fallthrough. Fixes: cd70f3d6e3fa ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
index a63e00653324..1546bc49004f 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
@@ -984,6 +984,7 @@ static int smu10_get_clock_by_type_with_latency(struct pp_hwmgr *hwmgr,
break;
case amd_pp_dpp_clock:
pclk_vol_table = pinfo->vdd_dep_on_dppclk;
+ break;
default:
return -EINVAL;
}