From: Christian König Date: Thu, 31 Mar 2016 11:05:51 +0000 (+0200) Subject: drm/amdgpu: fix leaking fence in the pageflip code X-Git-Tag: v4.9.8~2296^2~1^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab7e9c137a85cf942c720498501d29719e61160c;p=platform%2Fkernel%2Flinux-rpi3.git 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 Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index f0ed974..3fb405b 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; }