summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-03-31 13:05:51 +0200
committerAlex Deucher <alexander.deucher@amd.com>2016-04-01 10:08:38 -0400
commitab7e9c137a85cf942c720498501d29719e61160c (patch)
tree4638b496b3a29c71463e72f84e685b809e20f20a
parent1f8628c76454561de3c3acd513fa9b17abf864cf (diff)
downloadlinux-ab7e9c137a85cf942c720498501d29719e61160c.tar.gz
linux-ab7e9c137a85cf942c720498501d29719e61160c.tar.bz2
linux-ab7e9c137a85cf942c720498501d29719e61160c.zip
drm/amdgpu: fix leaking fence in the pageflip code
This fixes a memory leak when we can't register the callback on a fence. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index f0ed974bd4e0..3fb405b3a614 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -57,7 +57,7 @@ static bool amdgpu_flip_handle_fence(struct amdgpu_flip_work *work,
if (!fence_add_callback(fence, &work->cb, amdgpu_flip_callback))
return true;
- fence_put(*f);
+ fence_put(fence);
return false;
}