summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_dma.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 6e188f08..c0ddeae0 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -1103,8 +1103,9 @@ int i915_driver_unload(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- if (dev_priv->mmio_map)
- drm_rmmap(dev, dev_priv->mmio_map);
+ i915_free_hardware_status(dev);
+
+ drm_rmmap(dev, dev_priv->mmio_map);
drm_free(dev->dev_private, sizeof(drm_i915_private_t),
DRM_MEM_DRIVER);
@@ -1113,8 +1114,6 @@ int i915_driver_unload(struct drm_device *dev)
intel_fini_chipset_flush_compat(dev);
#endif
#endif
- i915_free_hardware_status(dev);
-
return 0;
}