diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-02-11 09:26:33 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-19 21:21:11 -0500 |
commit | 47ed185a777632063d2748f59d14ec6fdeb26f67 (patch) | |
tree | ef3f96362d97d88b71d93e5a65cb3cd54814c925 /drivers | |
parent | 491152b8778d7d290579c989e8607892accde920 (diff) |
drm/i915: Unpin the ringbuffer if we fail to ioremap it.
A missing unpin on the error path.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 0bec4e6d3369..e5fc664337f3 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3159,6 +3159,7 @@ i915_gem_init_ringbuffer(struct drm_device *dev) | |||
3159 | if (ring->map.handle == NULL) { | 3159 | if (ring->map.handle == NULL) { |
3160 | DRM_ERROR("Failed to map ringbuffer.\n"); | 3160 | DRM_ERROR("Failed to map ringbuffer.\n"); |
3161 | memset(&dev_priv->ring, 0, sizeof(dev_priv->ring)); | 3161 | memset(&dev_priv->ring, 0, sizeof(dev_priv->ring)); |
3162 | i915_gem_object_unpin(obj); | ||
3162 | drm_gem_object_unreference(obj); | 3163 | drm_gem_object_unreference(obj); |
3163 | return -EINVAL; | 3164 | return -EINVAL; |
3164 | } | 3165 | } |