drm/radeon/kms: drop lock in return path of radeon_fence_count_emitted.
authorDave Airlie <airlied@redhat.com>
Mon, 13 Feb 2012 12:18:37 +0000 (12:18 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 14 Feb 2012 10:56:16 +0000 (10:56 +0000)
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>
drivers/gpu/drm/radeon/radeon_fence.c

index 64ea3dd9e6ff2ab58ed36476693a9dde4cff6f5a..4bd36a354fbef7d473dd321d92c96f828611d815 100644 (file)
@@ -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;