diff options
author | Amit Shekhar <ashekhar@codeaurora.org> | 2014-01-30 12:47:34 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-03-06 08:56:51 -0800 |
commit | 1482406b70a254fc85d153a7066d7f90d724d195 (patch) | |
tree | 740179186e28a83df51179b6ed7e3dfec5089e35 /modules | |
parent | 7ccf148f5066ceb1a161f0d7a7d66f75c6e8d420 (diff) | |
download | hardware_libhardware-1482406b70a254fc85d153a7066d7f90d724d195.zip hardware_libhardware-1482406b70a254fc85d153a7066d7f90d724d195.tar.gz hardware_libhardware-1482406b70a254fc85d153a7066d7f90d724d195.tar.bz2 |
usbaudio: fix for out->dev->lock remains locked in error case
out->dev->lock remains locked in error case in out_write()
Added pthread_mutex_unlock() in the error case
Bug: 12824374
Change-Id: Id467e3122008eb8128b42dfc0e9103600c1eef2d
Signed-off-by: Glenn Kasten <gkasten@google.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/usbaudio/audio_hw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/usbaudio/audio_hw.c b/modules/usbaudio/audio_hw.c index f33c343..24a2d63 100644 --- a/modules/usbaudio/audio_hw.c +++ b/modules/usbaudio/audio_hw.c @@ -212,7 +212,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer, err: pthread_mutex_unlock(&out->lock); - + pthread_mutex_unlock(&out->dev->lock); if (ret != 0) { usleep(bytes * 1000000 / audio_stream_frame_size(&stream->common) / out_get_sample_rate(&stream->common)); |