Skip to content

Commit

Permalink
drm/i915: Remove redundant test in error path.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Dave Airlie committed Dec 29, 2008
1 parent fede5c9 commit aad87df
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit aad87df

Please sign in to comment.