]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/i915: Call context fini at cleanup
authorBen Widawsky <ben@bwidawsk.net>
Sat, 25 May 2013 19:26:39 +0000 (12:26 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 31 May 2013 18:53:58 +0000 (20:53 +0200)
If contexts were actually initialized, and we fail somewhere later during
init this would possibly leak memory, and lead to some error messages
about unclean takedown. As the odds of this occurring, and someone
actually caring/noticing are pretty slim, the patch isn't terribly
important.

Found by code inspection while working on something else.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c

index 45283679ac874c2f0f27b68b2f268d67b816423e..bd56c5560fa0de87d3fef1011519271529f31ec5 100644 (file)
@@ -1359,6 +1359,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
 cleanup_gem:
        mutex_lock(&dev->struct_mutex);
        i915_gem_cleanup_ringbuffer(dev);
+       i915_gem_context_fini(dev);
        mutex_unlock(&dev->struct_mutex);
        i915_gem_cleanup_aliasing_ppgtt(dev);
        drm_mm_takedown(&dev_priv->mm.gtt_space);