Skip to content

Commit

Permalink
drm/radeon/kms: fix return value from fence function.
Browse files Browse the repository at this point in the history
We only want to return here for errors, the wait functions return
a positive timeout otherwise, which gets back to userspace and
causes X to crash here.

Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Dec 10, 2009
1 parent 5cc6fba commit 2e7b6f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/radeon_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ int radeon_fence_wait(struct radeon_fence *fence, bool intr)
r = wait_event_interruptible_timeout(rdev->fence_drv.queue,
radeon_fence_signaled(fence), timeout);
radeon_irq_kms_sw_irq_put(rdev);
if (unlikely(r != 0))
if (unlikely(r < 0))
return r;
} else {
radeon_irq_kms_sw_irq_get(rdev);
Expand Down

0 comments on commit 2e7b6f7

Please sign in to comment.