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

Commit 65115889 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6056566 from d2f27cd1 to rvc-release

Change-Id: I34ee7e1ff49f3e5bab2c88116f1a8b4458277509
parents 091eac11 d2f27cd1
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -6284,12 +6284,10 @@ static int adev_verify_devices(struct audio_device *adev)
static int adev_close(hw_device_t *device)
{
    size_t i;
    struct audio_device *adev_temp = (struct audio_device *)device;

    if (!adev_temp)
        return 0;

    pthread_mutex_lock(&adev_init_lock);
    if (!device || ((struct audio_device *)device != adev))
        goto done;

    if ((--audio_device_ref_count) == 0) {
        audio_extn_snd_mon_unregister_listener(adev);
@@ -6308,10 +6306,11 @@ static int adev_close(hw_device_t *device)
            adev->adm_deinit(adev->adm_data);
        pthread_mutex_destroy(&adev->lock);
        free(device);
        adev = NULL;
    }

done:
    pthread_mutex_unlock(&adev_init_lock);

    return 0;
}