drm/radeon/kms: fix return value from fence function.
authorDave Airlie <airlied@redhat.com>
Wed, 9 Dec 2009 05:32:23 +0000 (15:32 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 10 Dec 2009 05:09:04 +0000 (15:09 +1000)
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>
drivers/gpu/drm/radeon/radeon_fence.c

index 78743cd..cb4cd97 100644 (file)
@@ -197,7 +197,7 @@ retry:
                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);