diff options
-rw-r--r-- | sound/usb/format.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c index ddfef57c4c9f..e831ee4238bb 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c | |||
@@ -155,7 +155,7 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof | |||
155 | if (fmt[0] < offset + 1 + 3 * (nr_rates ? nr_rates : 2)) { | 155 | if (fmt[0] < offset + 1 + 3 * (nr_rates ? nr_rates : 2)) { |
156 | snd_printk(KERN_ERR "%d:%u:%d : invalid UAC_FORMAT_TYPE desc\n", | 156 | snd_printk(KERN_ERR "%d:%u:%d : invalid UAC_FORMAT_TYPE desc\n", |
157 | chip->dev->devnum, fp->iface, fp->altsetting); | 157 | chip->dev->devnum, fp->iface, fp->altsetting); |
158 | return -1; | 158 | return -EINVAL; |
159 | } | 159 | } |
160 | 160 | ||
161 | if (nr_rates) { | 161 | if (nr_rates) { |
@@ -167,7 +167,7 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof | |||
167 | fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL); | 167 | fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL); |
168 | if (fp->rate_table == NULL) { | 168 | if (fp->rate_table == NULL) { |
169 | snd_printk(KERN_ERR "cannot malloc\n"); | 169 | snd_printk(KERN_ERR "cannot malloc\n"); |
170 | return -1; | 170 | return -ENOMEM; |
171 | } | 171 | } |
172 | 172 | ||
173 | fp->nr_rates = 0; | 173 | fp->nr_rates = 0; |
@@ -198,7 +198,7 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof | |||
198 | } | 198 | } |
199 | if (!fp->nr_rates) { | 199 | if (!fp->nr_rates) { |
200 | hwc_debug("All rates were zero. Skipping format!\n"); | 200 | hwc_debug("All rates were zero. Skipping format!\n"); |
201 | return -1; | 201 | return -EINVAL; |
202 | } | 202 | } |
203 | } else { | 203 | } else { |
204 | /* continuous rates */ | 204 | /* continuous rates */ |
@@ -383,7 +383,7 @@ static int parse_audio_format_i(struct snd_usb_audio *chip, | |||
383 | fp->formats = parse_audio_format_i_type(chip, fp, format, | 383 | fp->formats = parse_audio_format_i_type(chip, fp, format, |
384 | fmt, protocol); | 384 | fmt, protocol); |
385 | if (!fp->formats) | 385 | if (!fp->formats) |
386 | return -1; | 386 | return -EINVAL; |
387 | } | 387 | } |
388 | 388 | ||
389 | /* gather possible sample rates */ | 389 | /* gather possible sample rates */ |
@@ -409,7 +409,7 @@ static int parse_audio_format_i(struct snd_usb_audio *chip, | |||
409 | if (fp->channels < 1) { | 409 | if (fp->channels < 1) { |
410 | snd_printk(KERN_ERR "%d:%u:%d : invalid channels %d\n", | 410 | snd_printk(KERN_ERR "%d:%u:%d : invalid channels %d\n", |
411 | chip->dev->devnum, fp->iface, fp->altsetting, fp->channels); | 411 | chip->dev->devnum, fp->iface, fp->altsetting, fp->channels); |
412 | return -1; | 412 | return -EINVAL; |
413 | } | 413 | } |
414 | 414 | ||
415 | return ret; | 415 | return ret; |