1
0
Fork 0

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>
hifive-unleashed-5.1
Chris Wilson 2009-02-11 14:26:33 +00:00 committed by Dave Airlie
parent 491152b877
commit 47ed185a77
1 changed files with 1 additions and 0 deletions

View File

@ -3159,6 +3159,7 @@ i915_gem_init_ringbuffer(struct drm_device *dev)
if (ring->map.handle == NULL) {
DRM_ERROR("Failed to map ringbuffer.\n");
memset(&dev_priv->ring, 0, sizeof(dev_priv->ring));
i915_gem_object_unpin(obj);
drm_gem_object_unreference(obj);
return -EINVAL;
}