summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_stolen.c
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-07-17 12:19:02 -0700
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-17 22:24:51 +0200
commitf7f181843e6c24644b4b71b8631a5ea87de05158 (patch)
tree74af92a69e9f846b21ad7bbd55a713162fbdf1c1 /drivers/gpu/drm/i915/i915_gem_stolen.c
parent5cef07e1628300aeda9ac9dae95a2b406175b3ff (diff)
downloadblackbird-op-linux-f7f181843e6c24644b4b71b8631a5ea87de05158.tar.gz
blackbird-op-linux-f7f181843e6c24644b4b71b8631a5ea87de05158.zip
drm/i915: Free stolen node on failed preallocation
The odds of this happening are *extremely* unlikely. Reported-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_stolen.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_stolen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
index 90a618335db9..cb527e7930ad 100644
--- a/drivers/gpu/drm/i915/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
@@ -402,7 +402,7 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
&obj->gtt_space);
if (ret) {
DRM_DEBUG_KMS("failed to allocate stolen GTT space\n");
- goto unref_out;
+ goto err_out;
}
}
@@ -413,7 +413,8 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
return obj;
-unref_out:
+err_out:
+ drm_mm_put_block(stolen);
drm_gem_object_unreference(&obj->base);
return NULL;
}
OpenPOWER on IntegriCloud