summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie2012-02-13 13:18:37 +0100
committerDave Airlie2012-02-14 11:56:16 +0100
commit40e8c738785a25be585fcf661c6bb32f1a090ef2 (patch)
tree581bf17f3e4556d6a1d00302e55a41ab68039c4b /drivers/gpu
parentMerge git://git.samba.org/sfrench/cifs-2.6 (diff)
downloadkernel-qcow2-linux-40e8c738785a25be585fcf661c6bb32f1a090ef2.tar.gz
kernel-qcow2-linux-40e8c738785a25be585fcf661c6bb32f1a090ef2.tar.xz
kernel-qcow2-linux-40e8c738785a25be585fcf661c6bb32f1a090ef2.zip
drm/radeon/kms: drop lock in return path of radeon_fence_count_emitted.
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_fence.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 64ea3dd9e6ff..4bd36a354fbe 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -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;