brillcodec: remove unused mutex_unlock method. 95/23495/2
authorKitae Kim <kt920.kim@samsung.com>
Thu, 26 Jun 2014 13:14:47 +0000 (22:14 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Thu, 26 Jun 2014 13:22:59 +0000 (22:22 +0900)
qemu_mutex_unlock was used at wrong place.
It might cause SEGV problem because this device tries to unlock invalid mutex.

Change-Id: I153406e583b26a813883d7e48ecd5b7093f420ea
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
tizen/src/hw/maru_brill_codec.c

index 0ef27e47ae43c5d35007b12661fcc89f5611e739..2287bcb12d57af174b6d6cae45b9083b2c7d0885 100644 (file)
@@ -214,17 +214,6 @@ static void maru_brill_codec_wakeup_threads(MaruBrillCodecState *s, int api_inde
 
     qemu_mutex_lock(&s->context_mutex);
 
-#if 0
-    if (ioparam->api_index == CODEC_DEINIT) {
-        if (s->context[ioparam->ctx_index].occupied_thread) {
-            s->context[ioparam->ctx_index].requested_close = true;
-            INFO("make running thread to handle deinit\n");
-            qemu_mutex_unlock(&s->context_mutex);
-            return;
-        }
-    } else
-#endif
-
     if (ioparam->api_index != CODEC_INIT) {
         if (!s->context[ioparam->ctx_index].opened_context) {
             INFO("abandon api %d for context %d\n",
@@ -1904,7 +1893,6 @@ static void maru_brill_codec_write(void *opaque, hwaddr addr,
         if (s->context[ctx_index].occupied_thread) {
             s->context[ctx_index].requested_close = true;
             INFO("make running thread to handle deinit\n");
-            qemu_mutex_unlock(&s->context_mutex);
         } else {
             maru_brill_codec_release_context(s, ctx_index);
         }