tbm_surface_internal: remove dead code 40/259940/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 17 Jun 2021 01:18:30 +0000 (10:18 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 17 Jun 2021 01:18:30 +0000 (10:18 +0900)
Change-Id: I540255281d74ade6a96c0e98ed50f4ffc6c5eeeb

src/tbm_surface_internal.c

index 5b899b9..e2a2dc3 100644 (file)
@@ -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: