From 0758aa1eb49ae1a4cf2e808f937af4583115a8ef Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Wed, 5 Oct 2011 11:47:59 -0700 Subject: audio HAL: fix start_call() error handling. In case of an error when opening the modem pcm driver in start_call(), the order in which the tinyalsa pcm streams were relased was wrong and could cause calling pcm_close() on a null pcm stream. Change-Id: Iad7149997d3993561f4a3ed4b2005f5867b51c56 --- audio/audio_hw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'audio') diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 48947cb..744edbc 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -595,12 +595,12 @@ static int start_call(struct tuna_audio_device *adev) return 0; -err_open_dl: - pcm_close(adev->pcm_modem_dl); - adev->pcm_modem_dl = NULL; err_open_ul: pcm_close(adev->pcm_modem_ul); adev->pcm_modem_ul = NULL; +err_open_dl: + pcm_close(adev->pcm_modem_dl); + adev->pcm_modem_dl = NULL; return -ENOMEM; } -- cgit v1.1