summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/i915_drv.c')
-rw-r--r--sys/dev/pci/drm/i915_drv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index 5d1888635bc..fefd718aeb6 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -3727,8 +3727,9 @@ i915_gem_leavevt_ioctl(struct drm_device *dev, void *data,
struct drm_i915_private *dev_priv = dev->dev_private;
int ret;
- ret = i915_gem_idle(dev_priv);
- drm_irq_uninstall(dev);
+ /* don't unistall if we fail, repeat calls on failure will screw us */
+ if ((ret = i915_gem_idle(dev_priv)) == 0)
+ drm_irq_uninstall(dev);
return (ret);
}