diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 630eec21b373..cc2ca5561feb 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2613,13 +2613,12 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, | |||
2613 | "back to user (%d)\n", | 2613 | "back to user (%d)\n", |
2614 | args->buffer_count, ret); | 2614 | args->buffer_count, ret); |
2615 | err: | 2615 | err: |
2616 | if (object_list != NULL) { | 2616 | for (i = 0; i < pinned; i++) |
2617 | for (i = 0; i < pinned; i++) | 2617 | i915_gem_object_unpin(object_list[i]); |
2618 | i915_gem_object_unpin(object_list[i]); | 2618 | |
2619 | for (i = 0; i < args->buffer_count; i++) | ||
2620 | drm_gem_object_unreference(object_list[i]); | ||
2619 | 2621 | ||
2620 | for (i = 0; i < args->buffer_count; i++) | ||
2621 | drm_gem_object_unreference(object_list[i]); | ||
2622 | } | ||
2623 | mutex_unlock(&dev->struct_mutex); | 2622 | mutex_unlock(&dev->struct_mutex); |
2624 | 2623 | ||
2625 | pre_mutex_err: | 2624 | pre_mutex_err: |