diff options
author | Dave Airlie <airlied@linux.ie> | 2004-08-23 10:05:01 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-08-23 10:05:01 +0000 |
commit | 7fe4f607681e9a5593e91915953a9b6c45e5f08c (patch) | |
tree | 585d6428e03bad220c527d1f71f4038d3da19587 /shared/radeon_cp.c | |
parent | 5c9ed8309493acb099463d25b32fabb5b7c004af (diff) |
set pointers to NULL after freeing, remove some extra debugging
Diffstat (limited to 'shared/radeon_cp.c')
-rw-r--r-- | shared/radeon_cp.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/shared/radeon_cp.c b/shared/radeon_cp.c index f634a345..6987a84c 100644 --- a/shared/radeon_cp.c +++ b/shared/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; |