diff options
author | Julia Lawall <julia@diku.dk> | 2008-12-21 10:28:47 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-12-29 02:47:27 -0500 |
commit | aad87dff5acb232666932e750318ec1fdb716e79 (patch) | |
tree | bd8ba4abf256cdbcdb5be32f92f716645a816d38 | |
parent | fede5c91c4a8a7701d205b2b84b9835ddc7d6f02 (diff) |
drm/i915: Remove redundant test in error path.
The error path for object list being null is in the second goto target.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
-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: |