drm/amdgpu: fix leaking fence in the pageflip code
authorChristian König <christian.koenig@amd.com>
Thu, 31 Mar 2016 11:05:51 +0000 (13:05 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 1 Apr 2016 14:08:38 +0000 (10:08 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

index f0ed974..3fb405b 100644 (file)
@@ -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;
 }