summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-12-21 16:28:47 +0100
committerDave Airlie <airlied@linux.ie>2008-12-29 08:47:27 +0100
commitaad87dff5acb232666932e750318ec1fdb716e79 (patch)
treebd8ba4abf256cdbcdb5be32f92f716645a816d38 /drivers/gpu
parentdrm: Add a debug node for vblank state. (diff)
downloadlinux-aad87dff5acb232666932e750318ec1fdb716e79.tar.xz
linux-aad87dff5acb232666932e750318ec1fdb716e79.zip
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c11
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,
"back to user (%d)\n",
args->buffer_count, ret);
err:
- if (object_list != NULL) {
- for (i = 0; i < pinned; i++)
- i915_gem_object_unpin(object_list[i]);
+ for (i = 0; i < pinned; i++)
+ i915_gem_object_unpin(object_list[i]);
+
+ for (i = 0; i < args->buffer_count; i++)
+ drm_gem_object_unreference(object_list[i]);
- for (i = 0; i < args->buffer_count; i++)
- drm_gem_object_unreference(object_list[i]);
- }
mutex_unlock(&dev->struct_mutex);
pre_mutex_err: