projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc56eff
)
[ALSA] Handle the error correctly in SNDCTL_DSP_SETFMT ioctl
author
Steven Finney
<sfinney@healthhero.com>
Thu, 13 Apr 2006 10:49:31 +0000
(12:49 +0200)
committer
Jaroslav Kysela
<perex@suse.cz>
Thu, 27 Apr 2006 19:10:06 +0000
(21:10 +0200)
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>
sound/core/oss/pcm_oss.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/core/oss/pcm_oss.c
b/sound/core/oss/pcm_oss.c
index c5978d6c6080777246d989293ad2ef1684833cbb..a7567b891791e761b7e7ee7d81374e01551360ad 100644
(file)
--- 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
if (format != AFMT_QUERY) {
formats = snd_pcm_oss_get_formats(pcm_oss_file);
+ if (formats < 0)
+ return formats;
if (!(formats & format))
format = AFMT_U8;
for (idx = 1; idx >= 0; --idx) {