summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2009-03-02 02:13:04 +0100
committerDave Airlie <airlied@redhat.com>2009-04-24 07:08:41 +0200
commit30ddbd94401a132f4d932775d1902b3c9a8c41b5 (patch)
treef3876e98de6c9969057e99cbd30df1805a9f30ca /drivers
parentdrm: remove unreachable code in drm_sysfs.c (diff)
downloadlinux-30ddbd94401a132f4d932775d1902b3c9a8c41b5.tar.xz
linux-30ddbd94401a132f4d932775d1902b3c9a8c41b5.zip
drm: clean the map list before destroying the hash table
The hash tables contains some of the mapping so its really nice to have it for the deletion phase. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_stub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index ef878615c49f..e8c2fd4c5e65 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -502,11 +502,11 @@ void drm_put_dev(struct drm_device *dev)
dev->agp = NULL;
}
- drm_ht_remove(&dev->map_hash);
- drm_ctxbitmap_cleanup(dev);
-
list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
drm_rmmap(dev, r_list->map);
+ drm_ht_remove(&dev->map_hash);
+
+ drm_ctxbitmap_cleanup(dev);
if (drm_core_check_feature(dev, DRIVER_MODESET))
drm_put_minor(&dev->control);