From f3910d779054af9e8037db15f97faad4fc42a379 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 17 Jun 2021 10:18:30 +0900 Subject: [PATCH] tbm_surface_internal: remove dead code Change-Id: I540255281d74ade6a96c0e98ed50f4ffc6c5eeeb --- src/tbm_surface_internal.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/tbm_surface_internal.c b/src/tbm_surface_internal.c index 5b899b9..e2a2dc3 100644 --- a/src/tbm_surface_internal.c +++ b/src/tbm_surface_internal.c @@ -949,17 +949,14 @@ _tbm_surface_internal_hal_tbm_import_surface(tbm_bufmgr bufmgr, int width, int h return surf; get_bo_fail: + for (j = 0; j < i; j++) { + if (surf->bos[j]) + tbm_bo_unref(surf->bos[j]); + } get_memory_types_fail: get_bos_fail: query_plane_data_fail: - if (hal_surface) { - hal_tbm_surface_free(hal_surface); - } else { - for (j = 0; j < i; j++) { - if (surf->bos[j]) - tbm_bo_unref(surf->bos[j]); - } - } + hal_tbm_surface_free(hal_surface); import_surface_fail: num_planes_fail: bpp_fail: -- 2.7.4