summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 63ca9e30620..bcdd518c8bf 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -337,10 +337,8 @@ fd_resource_transfer_map(struct pipe_context *pctx,
}
buf = fd_bo_map(rsc->bo);
- if (!buf) {
- fd_resource_transfer_unmap(pctx, ptrans);
- return NULL;
- }
+ if (!buf)
+ goto fail;
offset = slice->offset +
box->y / util_format_get_blockheight(format) * ptrans->stride +