From: Christian Gmeiner Date: Fri, 29 Nov 2019 14:15:27 +0000 (+0100) Subject: etnaviv: remove dead code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1be220833c18139ff9f3c7c9237deeb726ba5c55;p=mesa.git 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 --- 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; }