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
commit5c290dade2a93873bffb4cb2f0c5972d7966ddf0 (patch)
treee59342c387728bf25e306b7729ce5b4e8fb0f18d /audio
parent6eca5ef3b38d19eea0e5a82adc4af57aadb580d9 (diff)
downloaddevice_samsung_tuna-5c290dade2a93873bffb4cb2f0c5972d7966ddf0.zip
device_samsung_tuna-5c290dade2a93873bffb4cb2f0c5972d7966ddf0.tar.gz
device_samsung_tuna-5c290dade2a93873bffb4cb2f0c5972d7966ddf0.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;
}