mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-08 10:40:22 +01:00
Move the deallocation of dev_private. Since dev_private is allocated when
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
This commit is contained in:
parent
9cad6fb4e0
commit
8e7c130ef7
1 changed files with 11 additions and 5 deletions
|
|
@ -572,10 +572,6 @@ static int mga_do_cleanup_dma(drm_device_t * dev)
|
|||
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;
|
||||
|
|
@ -723,7 +719,17 @@ int mga_dma_buffers(DRM_IOCTL_ARGS)
|
|||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue