Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e57d7e4 authored by Apoorv Raghuvanshi's avatar Apoorv Raghuvanshi Committed by Gerrit - the friendly Code Review server
Browse files

hal: Fix for adev_open causing hang

- Mutex acquired in the begining of
  the synchronised block but is not
  unlocked when platform_init fails.

- Fix by adding the mutex unlock code.

Change-Id: I02b7f7cac0185dd40ec9f03e443e4de98b18c105
CRs-fixed: 590216
parent 84fa2fe2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2593,6 +2593,7 @@ static int adev_open(const hw_module_t *module, const char *name,
        free(adev);
        ALOGE("%s: Failed to init platform data, aborting.", __func__);
        *device = NULL;
        pthread_mutex_unlock(&adev_init_lock);
        return -EINVAL;
    }