summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/mach64_dma.c4
-rw-r--r--shared-core/mga_dma.c4
-rw-r--r--shared-core/r128_cce.c4
-rw-r--r--shared-core/radeon_cp.c14
4 files changed, 18 insertions, 8 deletions
diff --git a/shared-core/mach64_dma.c b/shared-core/mach64_dma.c
index 0acb784d..4f90916d 100644
--- a/shared-core/mach64_dma.c
+++ b/shared-core/mach64_dma.c
@@ -993,8 +993,10 @@ int mach64_do_cleanup_dma( drm_device_t *dev )
drm_core_ioremapfree( dev_priv->ring_map, dev );
}
- if ( dev->agp_buffer_map )
+ if ( dev->agp_buffer_map ) {
drm_core_ioremapfree( dev->agp_buffer_map, dev );
+ dev->agp_buffer_map = NULL;
+ }
mach64_destroy_freelist( dev );
diff --git a/shared-core/mga_dma.c b/shared-core/mga_dma.c
index 4a38b7d9..2a095014 100644
--- a/shared-core/mga_dma.c
+++ b/shared-core/mga_dma.c
@@ -645,8 +645,10 @@ int mga_do_cleanup_dma( drm_device_t *dev )
drm_core_ioremapfree( dev_priv->warp, dev );
if ( dev_priv->primary != NULL )
drm_core_ioremapfree( dev_priv->primary, dev );
- if ( dev->agp_buffer_map != NULL )
+ if ( dev->agp_buffer_map != NULL ) {
drm_core_ioremapfree( dev->agp_buffer_map, dev );
+ dev->agp_buffer_map = NULL;
+ }
if ( dev_priv->head != NULL ) {
mga_freelist_cleanup( dev );
diff --git a/shared-core/r128_cce.c b/shared-core/r128_cce.c
index 43fa9b51..c6c7f6d3 100644
--- a/shared-core/r128_cce.c
+++ b/shared-core/r128_cce.c
@@ -603,8 +603,10 @@ int r128_do_cleanup_cce( drm_device_t *dev )
drm_core_ioremapfree( dev_priv->cce_ring, dev );
if ( dev_priv->ring_rptr != NULL )
drm_core_ioremapfree( dev_priv->ring_rptr, dev );
- if ( dev->agp_buffer_map != NULL )
+ if ( dev->agp_buffer_map != NULL ) {
drm_core_ioremapfree( dev->agp_buffer_map, dev );
+ dev->agp_buffer_map = NULL;
+ }
} else
#endif
{
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index f634a345..6987a84c 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -1267,12 +1267,18 @@ int radeon_do_cleanup_cp( drm_device_t *dev )
#if __REALLY_HAVE_AGP
if (dev_priv->flags & CHIP_IS_AGP) {
- if ( dev_priv->cp_ring != NULL )
+ if ( dev_priv->cp_ring != NULL ) {
drm_core_ioremapfree( dev_priv->cp_ring, dev );
- if ( dev_priv->ring_rptr != NULL )
+ dev_priv->cp_ring = NULL;
+ }
+ if ( dev_priv->ring_rptr != NULL ) {
drm_core_ioremapfree( dev_priv->ring_rptr, dev );
- if ( dev->agp_buffer_map != NULL )
+ dev_priv->ring_rptr = NULL;
+ }
+ if ( dev->agp_buffer_map != NULL ) {
drm_core_ioremapfree( dev->agp_buffer_map, dev );
+ dev->agp_buffer_map = NULL;
+ }
} else
#endif
{
@@ -1424,7 +1430,6 @@ void radeon_do_release( drm_device_t *dev )
{
drm_radeon_private_t *dev_priv = dev->dev_private;
int ret;
- DRM_DEBUG("dev_priv %ptr\n", dev_priv);
if (dev_priv) {
@@ -1761,7 +1766,6 @@ int radeon_preinit( struct drm_device *dev, unsigned long flags )
dev_priv = DRM(alloc)( sizeof(drm_radeon_private_t), DRM_MEM_DRIVER );
if ( dev_priv == NULL )
return DRM_ERR(ENOMEM);
- DRM_DEBUG("dev_priv %ptr\n", dev_priv);
memset( dev_priv, 0, sizeof(drm_radeon_private_t) );
dev->dev_private = (void *)dev_priv;