diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 874cce62f51ac42002b1cd08144e0f5654c15d88..93b4232ee280b5896035933533d0fec6ffc7ee07 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2004,6 +2004,7 @@ i915_gem_object_unbind(struct drm_gem_object *obj) } i915_gem_object_put_pages(obj); + BUG_ON(obj_priv->pages_refcount); if (obj_priv->gtt_space) { atomic_dec(&dev->gtt_count);