aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2097-drm-amd-powerplay-fix-memory-leak-of-hardcoded-pptab.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2097-drm-amd-powerplay-fix-memory-leak-of-hardcoded-pptab.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2097-drm-amd-powerplay-fix-memory-leak-of-hardcoded-pptab.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2097-drm-amd-powerplay-fix-memory-leak-of-hardcoded-pptab.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2097-drm-amd-powerplay-fix-memory-leak-of-hardcoded-pptab.patch
new file mode 100644
index 00000000..030f6d1a
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2097-drm-amd-powerplay-fix-memory-leak-of-hardcoded-pptab.patch
@@ -0,0 +1,29 @@
+From 1981e296e5349e71f3dc0b50ab38136fc06e14bd Mon Sep 17 00:00:00 2001
+From: Eric Huang <JinHuiEric.Huang@amd.com>
+Date: Tue, 31 Oct 2017 17:35:28 -0400
+Subject: [PATCH 2097/4131] drm/amd/powerplay: fix memory leak of hardcoded
+ pptable
+
+Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
+Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+index 20d9721..b88f6f8 100644
+--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
++++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+@@ -78,6 +78,9 @@ static int amd_powerplay_destroy(void *handle)
+ {
+ struct pp_instance *instance = (struct pp_instance *)handle;
+
++ kfree(instance->hwmgr->hardcode_pp_table);
++ instance->hwmgr->hardcode_pp_table = NULL;
++
+ kfree(instance->hwmgr);
+ instance->hwmgr = NULL;
+
+--
+2.7.4
+