diff options
author | 2010-05-26 18:11:37 +0200 | |
---|---|---|
committer | 2010-05-27 09:48:47 +0200 | |
commit | 8d0912427113723c3f3a4dca631638844c4ab649 (patch) | |
tree | d2c8e8e16d7db56af1f16c5329d5d4c97024163f /sound/usb/format.c | |
parent | ALSA: usb-audio: parse more format descriptors with structs (diff) | |
download | linux-8d0912427113723c3f3a4dca631638844c4ab649.tar.gz linux-8d0912427113723c3f3a4dca631638844c4ab649.tar.bz2 linux-8d0912427113723c3f3a4dca631638844c4ab649.zip |
ALSA: usb-audio: fix return values
-1 is not a good return value as it means -EPERM, "not permitted".
Choose -ENOTSUPP instead, which is what the code really wants to tell
its callers.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/format.c')
-rw-r--r-- | sound/usb/format.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c index caaa3ef9e622..fe29d61de19b 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -408,7 +408,7 @@ int snd_usb_parse_audio_format(struct snd_usb_audio *chip, struct audioformat *f snd_printd(KERN_INFO "%d:%u:%d : format type %d is not supported yet\n", chip->dev->devnum, fp->iface, fp->altsetting, fmt->bFormatType); - return -1; + return -ENOTSUPP; } fp->fmt_type = fmt->bFormatType; if (err < 0) @@ -424,7 +424,7 @@ int snd_usb_parse_audio_format(struct snd_usb_audio *chip, struct audioformat *f if (fmt->bFormatType == UAC_FORMAT_TYPE_I && fp->rates != SNDRV_PCM_RATE_48000 && fp->rates != SNDRV_PCM_RATE_96000) - return -1; + return -ENOTSUPP; } #endif return 0; |