the driver is loaded and is always expected to be around, it should
only be deallocated when the driver is unloaded.
Xorg bug: #3408 Reported by: Chris Rankin
if (dev_priv->head != NULL) {
mga_freelist_cleanup(dev);
}
-
- drm_free(dev->dev_private, sizeof(drm_mga_private_t),
- DRM_MEM_DRIVER);
- dev->dev_private = NULL;
}
return 0;
int mga_driver_postcleanup(drm_device_t * dev)
{
- return mga_do_cleanup_dma(dev);
+ int err;
+
+
+ err = mga_do_cleanup_dma(dev);
+ if (!err) {
+ drm_free(dev->dev_private, sizeof(drm_mga_private_t),
+ DRM_MEM_DRIVER);
+ dev->dev_private = NULL;
+ }
+
+ return err;
}
int mga_driver_dma_quiescent(drm_device_t * dev)