summaryrefslogtreecommitdiff
path: root/libdrm/radeon
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm/radeon')
-rw-r--r--libdrm/radeon/radeon_bo_gem.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libdrm/radeon/radeon_bo_gem.c b/libdrm/radeon/radeon_bo_gem.c
index 3c3b3e5b..cf59a359 100644
--- a/libdrm/radeon/radeon_bo_gem.c
+++ b/libdrm/radeon/radeon_bo_gem.c
@@ -156,11 +156,7 @@ static int bo_map(struct radeon_bo *bo, int write)
return 0;
}
if (bo_gem->priv_ptr) {
- r = bo_wait(bo);
- bo->ptr = bo_gem->priv_ptr;
- if (r)
- return r;
- return 0;
+ goto wait;
}
bo->ptr = NULL;
@@ -180,8 +176,12 @@ static int bo_map(struct radeon_bo *bo, int write)
if (ptr == MAP_FAILED)
return -errno;
bo_gem->priv_ptr = ptr;
+wait:
bo->ptr = bo_gem->priv_ptr;
- return r;
+ r = bo_wait(bo);
+ if (r)
+ return r;
+ return 0;
}
static int bo_unmap(struct radeon_bo *bo)