summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-02-10 21:09:56 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-02-10 21:09:56 +0000
commit4113e455a317785b83324215a6b0156995665989 (patch)
treef1c99525a948302b2f1f0e4bfa2ec7a1dd88d62a
parent5d34902c0cb9712179292112fbdb0f06be327fd8 (diff)
drm/i965: fix use of uninitialized variable whilst dumping errors
Cut'n'paste bug from i915 error path.
-rw-r--r--src/drm/cairo-drm-i965-surface.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/drm/cairo-drm-i965-surface.c b/src/drm/cairo-drm-i965-surface.c
index 0e0def81..e1bdf5f0 100644
--- a/src/drm/cairo-drm-i965-surface.c
+++ b/src/drm/cairo-drm-i965-surface.c
@@ -351,8 +351,6 @@ i965_exec (i965_device_t *device, uint32_t offset)
ret = ioctl (device->intel.base.fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
} while (ret != 0 && errno == EINTR);
if (unlikely (ret)) {
- int n;
-
if (errno == ENOMEM)
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
else
@@ -364,9 +362,9 @@ i965_exec (i965_device_t *device, uint32_t offset)
fprintf (stderr, " %d buffers:\n",
device->exec.count);
- for (n = 0; n < i; n++) {
+ for (i = 0; i < device->exec.count; i++) {
fprintf (stderr, " exec[%d] = %d\n",
- n, device->exec.bo[n]->base.size);
+ i, device->exec.bo[i]->base.size);
}
intel_dump_batchbuffer ((uint32_t *) device->batch.data,