brillcodec: remove unused mutex_unlock.
authorKitae Kim <kt920.kim@samsung.com>
Mon, 30 Jun 2014 06:12:46 +0000 (15:12 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Mon, 30 Jun 2014 06:14:09 +0000 (15:14 +0900)
qemu_mutex_unlock was used at wrong place.
It might cause SEGV problem because this device tries to unlock invalid mutex.

Change-Id: I2b8b23c2ef3d0436d9ba6ffc8ba97585340c65b7
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);
         }