From 1be220833c18139ff9f3c7c9237deeb726ba5c55 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Fri, 29 Nov 2019 15:15:27 +0100 Subject: [PATCH] etnaviv: remove dead code ptiled is always NULL so the if statement is useless. CoverityID: 1415572 Fixes: b9627765303 ("etnaviv: rework compatible render base") CC: Reviewed-by: Jonathan Marek Signed-off-by: Christian Gmeiner --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index f4200be437d..03b3ef8719e 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -494,7 +494,6 @@ etna_resource_from_handle(struct pipe_screen *pscreen, struct etna_resource *rsc; struct etna_resource_level *level; struct pipe_resource *prsc; - struct pipe_resource *ptiled = NULL; DBG("target=%d, format=%s, %ux%ux%u, array_size=%u, last_level=%u, " "nr_samples=%u, usage=%u, bind=%x, flags=%x", @@ -568,8 +567,6 @@ etna_resource_from_handle(struct pipe_screen *pscreen, fail: etna_resource_destroy(pscreen, prsc); - if (ptiled) - etna_resource_destroy(pscreen, ptiled); return NULL; } -- 2.30.2