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>
This commit is contained in:
committed by
Eric Laurent
parent
7ccf148f50
commit
1482406b70
@@ -212,7 +212,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
|
|||||||
|
|
||||||
err:
|
err:
|
||||||
pthread_mutex_unlock(&out->lock);
|
pthread_mutex_unlock(&out->lock);
|
||||||
|
pthread_mutex_unlock(&out->dev->lock);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
usleep(bytes * 1000000 / audio_stream_frame_size(&stream->common) /
|
usleep(bytes * 1000000 / audio_stream_frame_size(&stream->common) /
|
||||||
out_get_sample_rate(&stream->common));
|
out_get_sample_rate(&stream->common));
|
||||||
|
|||||||
Reference in New Issue
Block a user