From f9953b7d52bcf560b15efde807f41cf0903e875d Mon Sep 17 00:00:00 2001 From: Amit Shekhar Date: Thu, 30 Jan 2014 12:47:34 -0800 Subject: 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: Ibbbd5ced1f9d469cfba3b33a94414d0b94affa8f Signed-off-by: Glenn Kasten --- modules/usbaudio/audio_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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)); -- cgit v1.1