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 <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Cc: [email protected]
Signed-off-by: Alex Deucher <[email protected]>
This commit is contained in:
Christian König 2016-03-31 13:05:51 +02:00 • committed by Alex Deucher
commit ab7e9c137a

View 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;
}