summaryrefslogtreecommitdiff
path: root/intel
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-12-08 22:35:24 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2009-12-08 22:35:24 +0000
commit08371bc29013370558728dcbeeed6a23ad2f5a70 (patch)
treedfd7d85aa858a391f7f02c38b16b4d30eb0b1cb8 /intel
parent28eae30689610faa0fe043ab869587e7699e82bf (diff)
intel: Clear virtual after failing to mmap_gtt.
Don't store the error return in bo_gem->gtt_virtual or else we will attempt to use that as a valid pointer in future mappings. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'intel')
-rw-r--r--intel/intel_bufmgr_gem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 5b76340a..f3af3a96 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -950,6 +950,7 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
MAP_SHARED, bufmgr_gem->fd,
mmap_arg.offset);
if (bo_gem->gtt_virtual == MAP_FAILED) {
+ bo_gem->gtt_virtual = NULL;
ret = -errno;
fprintf(stderr,
"%s:%d: Error mapping buffer %d (%s): %s .\n",