aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0140-drm-amd-powerplay-fix-a-reversed-condition.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0140-drm-amd-powerplay-fix-a-reversed-condition.patch')
-rw-r--r--common/recipes-kernel/linux/files/0140-drm-amd-powerplay-fix-a-reversed-condition.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0140-drm-amd-powerplay-fix-a-reversed-condition.patch b/common/recipes-kernel/linux/files/0140-drm-amd-powerplay-fix-a-reversed-condition.patch
new file mode 100644
index 00000000..eeeeab1e
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0140-drm-amd-powerplay-fix-a-reversed-condition.patch
@@ -0,0 +1,30 @@
+From cf517f048b1f4e035b131eddaa42914872503380 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Mon, 4 Jan 2016 23:42:55 +0300
+Subject: [PATCH 0140/1110] drm/amd/powerplay: fix a reversed condition
+
+This test was reversed so it would end up leading to a NULL dereference.
+
+Fixes: 4630f0faae80 ('drm/amd/powerplay: add Carrizo smu support')
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
+index e74023b..873a8d2 100644
+--- a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
++++ b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
+@@ -818,7 +818,7 @@ static int cz_smu_fini(struct pp_smumgr *smumgr)
+ return -EINVAL;
+
+ cz_smu = (struct cz_smumgr *)smumgr->backend;
+- if (!cz_smu) {
++ if (cz_smu) {
+ cgs_free_gpu_mem(smumgr->device,
+ cz_smu->toc_buffer.handle);
+ cgs_free_gpu_mem(smumgr->device,
+--
+2.7.4
+