diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-02 17:33:03 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-03 04:25:33 -0400 |
commit | e02f14cd48a5da0ebaecf88c93dbd54a81e0dead (patch) | |
tree | 9a5af6d70c2a8e9c499f73f42ca3b6e548715190 /drivers/gpu | |
parent | 650dc07ec3b0eba8ff21da706d2b1876ada59fc3 (diff) |
drm/i915: don't leak struct_mutex lock on ppgtt init failures
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 8a62285ddbd0..785f67f963ef 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -1222,8 +1222,10 @@ static int i915_load_gem_init(struct drm_device *dev) | |||
1222 | i915_gem_do_init(dev, 0, mappable_size, gtt_size); | 1222 | i915_gem_do_init(dev, 0, mappable_size, gtt_size); |
1223 | 1223 | ||
1224 | ret = i915_gem_init_aliasing_ppgtt(dev); | 1224 | ret = i915_gem_init_aliasing_ppgtt(dev); |
1225 | if (ret) | 1225 | if (ret) { |
1226 | mutex_unlock(&dev->struct_mutex); | ||
1226 | return ret; | 1227 | return ret; |
1228 | } | ||
1227 | } else { | 1229 | } else { |
1228 | /* Let GEM Manage all of the aperture. | 1230 | /* Let GEM Manage all of the aperture. |
1229 | * | 1231 | * |