Skip to content

Commit

Permalink
drm: clean the map list before destroying the hash table
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Skeggs authored and Dave Airlie committed Apr 24, 2009
1 parent 400138b commit 30ddbd9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/drm_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 30ddbd9

Please sign in to comment.