diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1169-drm-amd-powerplay-Fix-missing-break-in-switch.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1169-drm-amd-powerplay-Fix-missing-break-in-switch.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1169-drm-amd-powerplay-Fix-missing-break-in-switch.patch b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1169-drm-amd-powerplay-Fix-missing-break-in-switch.patch new file mode 100644 index 00000000..8f6a8c48 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1169-drm-amd-powerplay-Fix-missing-break-in-switch.patch @@ -0,0 +1,38 @@ +From c8818d272e1f942b37d7d49f4fe07de963adc4a5 Mon Sep 17 00:00:00 2001 +From: "Gustavo A. R. Silva" <gustavo@embeddedor.com> +Date: Fri, 25 Jan 2019 15:55:33 -0600 +Subject: [PATCH 1169/2940] 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: 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> +--- + 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 f95c5f50eb0f..5273de3c5b98 100644 +--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c ++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c +@@ -1033,6 +1033,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.17.1 + |