hwc: unlock before reture 19/171119/3
authorBoram Park <boram1288.park@samsung.com>
Mon, 26 Feb 2018 23:32:41 +0000 (08:32 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 27 Feb 2018 00:18:44 +0000 (09:18 +0900)
Change-Id: Ic60059f20d7a4de093d951ea15800adc14ad1d99

src/tdm_output.c

index 3d096d9..e73de5b 100644 (file)
@@ -1938,6 +1938,7 @@ tdm_output_hwc_commit_client_target_buffer(tdm_output *output, tdm_output_hwc_ta
        if (ret != TDM_ERROR_NONE) {
                /* LCOV_EXCL_START */
                TDM_ERR("failed: layer set info(window)");
+               _pthread_mutex_unlock(&private_display->lock);
                /* LCOV_EXCL_STOP */
                return ret;
        }
@@ -1960,6 +1961,7 @@ tdm_output_hwc_commit_client_target_buffer(tdm_output *output, tdm_output_hwc_ta
                if (ret != TDM_ERROR_NONE) {
                        /* LCOV_EXCL_START */
                        TDM_ERR("failed: layer set info(window)");
+                       _pthread_mutex_unlock(&private_display->lock);
                        /* LCOV_EXCL_STOP */
                        return ret;
                }
@@ -1971,6 +1973,7 @@ tdm_output_hwc_commit_client_target_buffer(tdm_output *output, tdm_output_hwc_ta
        if (!output_hwc_target_buffer_commit_handler) {
                /* LCOV_EXCL_START */
                TDM_ERR("failed: alloc memory");
+               _pthread_mutex_unlock(&private_display->lock);
                return TDM_ERROR_OUT_OF_MEMORY;
                /* LCOV_EXCL_STOP */
        }
@@ -1984,6 +1987,7 @@ tdm_output_hwc_commit_client_target_buffer(tdm_output *output, tdm_output_hwc_ta
                /* LCOV_EXCL_START */
                TDM_ERR("failed: commit layer(target buffer)");
                free(output_hwc_target_buffer_commit_handler);
+               _pthread_mutex_unlock(&private_display->lock);
                /* LCOV_EXCL_STOP */
                return ret;
        }