From: Ben Widawsky Date: Fri, 6 Dec 2013 22:10:50 +0000 (-0800) Subject: drm/i915: Takedown drm_mm on failed gtt setup X-Git-Tag: next-20140306~57^2~4^2~80^2~51 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c39538a88dcfdbb905e60f9168d6d49460cabe57;p=karo-tx-linux.git drm/i915: Takedown drm_mm on failed gtt setup 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 Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 360b68fbef6d..11141590eda0 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -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; }