From: Dave Airlie Date: Wed, 9 Dec 2009 05:32:23 +0000 (+1000) Subject: drm/radeon/kms: fix return value from fence function. X-Git-Tag: MMI-PSA29.97-13-9~25013^2~82^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2e7b6f7fa62d92d941c626f8ae45f5cd75a52d55;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/radeon/kms: fix return value from fence function. 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 --- diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index 78743cd70433..cb4cd97ae39f 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c @@ -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);