freedreno: change to goto fail
authorSerge Martin <edb+mesa@sigluy.net>
Sun, 6 Dec 2015 14:32:16 +0000 (15:32 +0100)
committerRob Clark <robclark@freedesktop.org>
Wed, 9 Dec 2015 22:31:16 +0000 (17:31 -0500)
in fd_resource_transfer_map, like the others error cases

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_resource.c

index 63ca9e30620acbcab4d7b7207ccbf421144efd65..bcdd518c8bf7c0e2ddfa3cab6b6f68fce582be25 100644 (file)
@@ -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 +