Commit 8d77a940 authored by Daniel Vetter's avatar Daniel Vetter

drm/gem: Be more friendly with locking checks

BUG_ON kills the driver, WARN_ON is much friendlier. And usually nothing
bad happens when the locking is slightly busted.

v2: Fix typos in commit message Thierry spotted.
Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent 0630db4f
...@@ -766,7 +766,7 @@ drm_gem_object_free(struct kref *kref) ...@@ -766,7 +766,7 @@ drm_gem_object_free(struct kref *kref)
struct drm_gem_object *obj = (struct drm_gem_object *) kref; struct drm_gem_object *obj = (struct drm_gem_object *) kref;
struct drm_device *dev = obj->dev; struct drm_device *dev = obj->dev;
BUG_ON(!mutex_is_locked(&dev->struct_mutex)); WARN_ON(!mutex_is_locked(&dev->struct_mutex));
if (dev->driver->gem_free_object != NULL) if (dev->driver->gem_free_object != NULL)
dev->driver->gem_free_object(obj); dev->driver->gem_free_object(obj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment