Commit 6ff774bd authored by Daniel Vetter's avatar Daniel Vetter

drm/gem: Use container_of in drm_gem_object_free

Just a random thing I spotted while reading code - better safe than
sorry.

Link: http://mid.gmane.org/1444894601-5200-11-git-send-email-daniel.vetter@ffwll.chReviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent ef4c6270
...@@ -763,7 +763,8 @@ EXPORT_SYMBOL(drm_gem_object_release); ...@@ -763,7 +763,8 @@ EXPORT_SYMBOL(drm_gem_object_release);
void void
drm_gem_object_free(struct kref *kref) drm_gem_object_free(struct kref *kref)
{ {
struct drm_gem_object *obj = (struct drm_gem_object *) kref; struct drm_gem_object *obj =
container_of(kref, struct drm_gem_object, refcount);
struct drm_device *dev = obj->dev; struct drm_device *dev = obj->dev;
WARN_ON(!mutex_is_locked(&dev->struct_mutex)); WARN_ON(!mutex_is_locked(&dev->struct_mutex));
......
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