diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/winsys/r600/drm/radeon_bo.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/winsys/r600/drm/radeon_bo.c b/src/gallium/winsys/r600/drm/radeon_bo.c index a1306f6e9d..f79135bfa1 100644 --- a/src/gallium/winsys/r600/drm/radeon_bo.c +++ b/src/gallium/winsys/r600/drm/radeon_bo.c @@ -96,8 +96,8 @@ int radeon_bo_map(struct radeon *radeon, struct radeon_bo *bo) void *ptr; int r; - if (bo->map_count++ != 0) { - return 0; + if (bo->map_count != 0) { + goto success; } /* Zero out args to make valgrind happy */ memset(&args, 0, sizeof(args)); @@ -117,6 +117,10 @@ int radeon_bo_map(struct radeon *radeon, struct radeon_bo *bo) return -errno; } bo->data = ptr; + +success: + bo->map_count++; + return 0; } |