Skip to content

Commit

Permalink
drm/radeon/kms: drop lock in return path of radeon_fence_count_emitted.
Browse files Browse the repository at this point in the history
Silly bad return path.

Reported-and-Tested-by: Mikko Vinni
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Feb 14, 2012
1 parent ce5afed commit 40e8c73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/radeon/radeon_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,10 @@ int radeon_fence_count_emitted(struct radeon_device *rdev, int ring)
int not_processed = 0;

read_lock_irqsave(&rdev->fence_lock, irq_flags);
if (!rdev->fence_drv[ring].initialized)
if (!rdev->fence_drv[ring].initialized) {
read_unlock_irqrestore(&rdev->fence_lock, irq_flags);
return 0;
}

if (!list_empty(&rdev->fence_drv[ring].emitted)) {
struct list_head *ptr;
Expand Down

0 comments on commit 40e8c73

Please sign in to comment.