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>
main
Chris Wilson 2009-12-08 22:35:24 +00:00
parent 28eae30689
commit 08371bc290
1 changed files with 1 additions and 0 deletions

View File

@ -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",