summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-10-05 11:47:59 -0700
committerEric Laurent <elaurent@google.com>2011-10-05 11:47:59 -0700
commit0758aa1eb49ae1a4cf2e808f937af4583115a8ef (patch)
tree17a95056ce4107c662873930fb6ecfc57d9cf8cb /audio
parent216a03e823c3768997cfb56e8f4e309ad8d11c9c (diff)
downloaddevice_samsung_tuna-0758aa1eb49ae1a4cf2e808f937af4583115a8ef.zip
device_samsung_tuna-0758aa1eb49ae1a4cf2e808f937af4583115a8ef.tar.gz
device_samsung_tuna-0758aa1eb49ae1a4cf2e808f937af4583115a8ef.tar.bz2
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
Diffstat (limited to 'audio')
-rwxr-xr-xaudio/audio_hw.c6
1 files changed, 3 insertions, 3 deletions
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;
}