Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30ddbd94 authored by Ben Skeggs's avatar Ben Skeggs Committed by Dave Airlie
Browse files

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: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 400138bc
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -502,11 +502,11 @@ void drm_put_dev(struct drm_device *dev)
		dev->agp = NULL;
		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)
	list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
		drm_rmmap(dev, r_list->map);
		drm_rmmap(dev, r_list->map);
	drm_ht_remove(&dev->map_hash);

	drm_ctxbitmap_cleanup(dev);


	if (drm_core_check_feature(dev, DRIVER_MODESET))
	if (drm_core_check_feature(dev, DRIVER_MODESET))
		drm_put_minor(&dev->control);
		drm_put_minor(&dev->control);