Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-02-15 10:23:48 +0100
committerJiri Slaby <jslaby@suse.cz>2019-02-15 10:24:11 +0100
commitc58854f7a351daec4e1598320432271fb2b069ce (patch)
tree29c0ee217cb91e963326229dfa2486ec3c44b2c9
parent4cff4a72567f08c096c0f4c928ff99d9ce5d1d5b (diff)
drm/amd/powerplay: Fix missing break in switch (bnc#1012628).
-rw-r--r--patches.kernel.org/4.20.9-039-drm-amd-powerplay-Fix-missing-break-in-switch.patch44
-rw-r--r--series.conf1
2 files changed, 45 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.9-039-drm-amd-powerplay-Fix-missing-break-in-switch.patch b/patches.kernel.org/4.20.9-039-drm-amd-powerplay-Fix-missing-break-in-switch.patch
new file mode 100644
index 0000000000..05aa1434b4
--- /dev/null
+++ b/patches.kernel.org/4.20.9-039-drm-amd-powerplay-Fix-missing-break-in-switch.patch
@@ -0,0 +1,44 @@
+From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
+Date: Fri, 25 Jan 2019 15:55:33 -0600
+Subject: [PATCH] drm/amd/powerplay: Fix missing break in switch
+References: bnc#1012628
+Patch-mainline: 4.20.9
+Git-commit: 2f10d823739680d2477ce34437e8a08a53117f40
+
+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>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
+index dd18cb710391..0b945d0fd732 100644
+--- 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_latency(struct pp_hwmgr *hwmgr,
+ break;
+ case amd_pp_dpp_clock:
+ pclk_vol_table = pinfo->vdd_dep_on_dppclk;
++ break;
+ default:
+ return -EINVAL;
+ }
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 14e6c2484c..d1edaecc0b 100644
--- a/series.conf
+++ b/series.conf
@@ -1121,6 +1121,7 @@
patches.kernel.org/4.20.9-036-mac80211-ensure-that-mgmt-tx-skbs-have-tailroo.patch
patches.kernel.org/4.20.9-037-drm-modes-Prevent-division-by-zero-htotal.patch
patches.kernel.org/4.20.9-038-drm-rockchip-rgb-update-SPDX-license-identifie.patch
+ patches.kernel.org/4.20.9-039-drm-amd-powerplay-Fix-missing-break-in-switch.patch
########################################################
# Build fixes that apply to the vanilla kernel too.