From 6935dbffb5008b74e306dbec9c623d56476edecb Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Wed, 21 Nov 2012 15:25:56 +0530 Subject: [PATCH] --- yaml --- r: 342597 b: refs/heads/master c: 8ad10dc6d3fe8396d8213af4d5ce58e0010a3cbc h: refs/heads/master i: 342595: 53529dcc8724e0210b124231221f8ca1e0eea520 v: v3 --- [refs] | 2 +- trunk/sound/usb/format.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 36cb09e6fd15..0077b94e6fdf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 27b2a22c714303d1920e269a8322ff23107694ee +refs/heads/master: 8ad10dc6d3fe8396d8213af4d5ce58e0010a3cbc diff --git a/trunk/sound/usb/format.c b/trunk/sound/usb/format.c index ddfef57c4c9f..e831ee4238bb 100644 --- a/trunk/sound/usb/format.c +++ b/trunk/sound/usb/format.c @@ -155,7 +155,7 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof if (fmt[0] < offset + 1 + 3 * (nr_rates ? nr_rates : 2)) { snd_printk(KERN_ERR "%d:%u:%d : invalid UAC_FORMAT_TYPE desc\n", chip->dev->devnum, fp->iface, fp->altsetting); - return -1; + return -EINVAL; } if (nr_rates) { @@ -167,7 +167,7 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL); if (fp->rate_table == NULL) { snd_printk(KERN_ERR "cannot malloc\n"); - return -1; + return -ENOMEM; } fp->nr_rates = 0; @@ -198,7 +198,7 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof } if (!fp->nr_rates) { hwc_debug("All rates were zero. Skipping format!\n"); - return -1; + return -EINVAL; } } else { /* continuous rates */ @@ -383,7 +383,7 @@ static int parse_audio_format_i(struct snd_usb_audio *chip, fp->formats = parse_audio_format_i_type(chip, fp, format, fmt, protocol); if (!fp->formats) - return -1; + return -EINVAL; } /* gather possible sample rates */ @@ -409,7 +409,7 @@ static int parse_audio_format_i(struct snd_usb_audio *chip, if (fp->channels < 1) { snd_printk(KERN_ERR "%d:%u:%d : invalid channels %d\n", chip->dev->devnum, fp->iface, fp->altsetting, fp->channels); - return -1; + return -EINVAL; } return ret;