Skip to content

Commit

Permalink
drm/i915: Takedown drm_mm on failed gtt setup
Browse files Browse the repository at this point in the history
This was found by code inspection. If the GTT setup fails then we are
left without properly tearing down the drm_mm.

Hopefully this never happens.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Ben Widawsky authored and Daniel Vetter committed Dec 18, 2013
1 parent 6e164c3 commit c39538a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4508,6 +4508,7 @@ int i915_gem_init(struct drm_device *dev)
mutex_unlock(&dev->struct_mutex);
if (ret) {
i915_gem_cleanup_aliasing_ppgtt(dev);
drm_mm_takedown(&dev_priv->gtt.base.mm);
return ret;
}

Expand Down

0 comments on commit c39538a

Please sign in to comment.