From 5b8ef016ece8752326ffc6e2b87b6b55e2fe1cab Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 14 Aug 2010 19:29:53 +0200 Subject: [PATCH] --- yaml --- r: 209458 b: refs/heads/master c: 38d7b08f374b640b00d350ac2d12ffed5d723423 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/usb/format.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6bf724418554..40d95bd3f658 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 31cbd97726207b483a1731562559fabd4e2efdd0 +refs/heads/master: 38d7b08f374b640b00d350ac2d12ffed5d723423 diff --git a/trunk/sound/usb/format.c b/trunk/sound/usb/format.c index 4387f54d73db..3a1375459c06 100644 --- a/trunk/sound/usb/format.c +++ b/trunk/sound/usb/format.c @@ -392,6 +392,10 @@ static int parse_audio_format_i(struct snd_usb_audio *chip, /* fp->channels is already set in this case */ ret = parse_audio_format_rates_v2(chip, fp); break; + default: + snd_printk(KERN_ERR "%d:%u:%d : invalid protocol version %d\n", + chip->dev->devnum, fp->iface, fp->altsetting, protocol); + return -EINVAL; } if (fp->channels < 1) { @@ -452,6 +456,10 @@ static int parse_audio_format_ii(struct snd_usb_audio *chip, ret = parse_audio_format_rates_v2(chip, fp); break; } + default: + snd_printk(KERN_ERR "%d:%u:%d : invalid protocol version %d\n", + chip->dev->devnum, fp->iface, fp->altsetting, protocol); + return -EINVAL; } return ret;