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 78743cd70433d2e5b7821f3cfb3415b5799b7aa0..cb4cd97ae39fa811d9bf68912f709b47270fe0d1 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);