From 06b72f1e1afd58e8f721c327a36f8d38e72982a7 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 8 Mar 2022 11:55:45 +0100 Subject: [PATCH] lima: replace opencoded slab_zalloc Acked-by: Emma Anholt Part-of: --- src/gallium/drivers/lima/lima_resource.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/lima/lima_resource.c b/src/gallium/drivers/lima/lima_resource.c index 3356db9a49d..edd14cf80e5 100644 --- a/src/gallium/drivers/lima/lima_resource.c +++ b/src/gallium/drivers/lima/lima_resource.c @@ -657,11 +657,10 @@ lima_transfer_map(struct pipe_context *pctx, if (!lima_bo_map(bo)) return NULL; - trans = slab_alloc(&ctx->transfer_pool); + trans = slab_zalloc(&ctx->transfer_pool); if (!trans) return NULL; - memset(trans, 0, sizeof(*trans)); ptrans = &trans->base; pipe_resource_reference(&ptrans->resource, pres);