aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorSteven Finney <sfinney@healthhero.com>2006-04-13 06:49:31 -0400
committerJaroslav Kysela <perex@suse.cz>2006-04-27 15:10:06 -0400
commit5c59e09d7e51f5781439aa6f1963076568fd1f4f (patch)
tree814d6aac2cfd5fa1b38721ae0ac1ac515a819e7a /sound/core
parentbc56eff1279d2f33a6afe74a673360ae1cd0d838 (diff)
[ALSA] Handle the error correctly in SNDCTL_DSP_SETFMT ioctl
Handle the error returned from snd_pcm_oss_get_formats() correctly in SNDCTL_DSP_SETFMT ioctl handler of PCM OSS emulation. Signed-off-by: Steven Finney <sfinney@healthhero.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/oss/pcm_oss.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index c5978d6c6080..a7567b891791 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1242,6 +1242,8 @@ static int snd_pcm_oss_set_format(struct snd_pcm_oss_file *pcm_oss_file, int for
1242 1242
1243 if (format != AFMT_QUERY) { 1243 if (format != AFMT_QUERY) {
1244 formats = snd_pcm_oss_get_formats(pcm_oss_file); 1244 formats = snd_pcm_oss_get_formats(pcm_oss_file);
1245 if (formats < 0)
1246 return formats;
1245 if (!(formats & format)) 1247 if (!(formats & format))
1246 format = AFMT_U8; 1248 format = AFMT_U8;
1247 for (idx = 1; idx >= 0; --idx) { 1249 for (idx = 1; idx >= 0; --idx) {