Skip to content

Commit

Permalink
drm/i915: don't leak struct_mutex lock on ppgtt init failures
Browse files Browse the repository at this point in the history
Reported-by: Konstantin Belousov <kostikbel@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Vetter committed Apr 3, 2012
1 parent 650dc07 commit e02f14c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,10 @@ static int i915_load_gem_init(struct drm_device *dev)
i915_gem_do_init(dev, 0, mappable_size, gtt_size);

ret = i915_gem_init_aliasing_ppgtt(dev);
if (ret)
if (ret) {
mutex_unlock(&dev->struct_mutex);
return ret;
}
} else {
/* Let GEM Manage all of the aperture.
*
Expand Down

0 comments on commit e02f14c

Please sign in to comment.