diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-08-20 21:25:11 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-08 10:13:25 +0100 |
commit | a8b4899e4658e53c0c8f4206af105e358e39ee93 (patch) | |
tree | 73235905364a2202311ed50ae05fd21d9c88db17 /drivers/gpu/drm/i915/i915_dma.c | |
parent | 6c0d93500eb50098e4e35b8b79e073f2f2f5b773 (diff) |
drm/i915: unload: don't leak error state
With kms, interrupts now get disabled in the modesetting cleanup. So
free the error state afterwards, it currently gets allocated in
the interrupt handler.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 45236e71666..970c338323a 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -2250,8 +2250,6 @@ int i915_driver_unload(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; - i915_destroy_error_state(dev); - spin_lock(&mchdev_lock); i915_mch_dev = NULL; spin_unlock(&mchdev_lock); @@ -2280,8 +2278,10 @@ int i915_driver_unload(struct drm_device *dev) vga_client_register(dev->pdev, NULL, NULL, NULL); } + /* Free error state after interrupts are fully disabled. */ del_timer_sync(&dev_priv->hangcheck_timer); cancel_work_sync(&dev_priv->error_work); + i915_destroy_error_state(dev); if (dev->pdev->msi_enabled) pci_disable_msi(dev->pdev); |