diff options
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r-- | sound/usb/mixer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index c22fa76e363a..ee9aa087d8b5 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -1191,6 +1191,11 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void | |||
1191 | 1191 | ||
1192 | if (state->mixer->protocol == UAC_VERSION_1) { | 1192 | if (state->mixer->protocol == UAC_VERSION_1) { |
1193 | csize = hdr->bControlSize; | 1193 | csize = hdr->bControlSize; |
1194 | if (!csize) { | ||
1195 | snd_printdd(KERN_ERR "usbaudio: unit %u: " | ||
1196 | "invalid bControlSize == 0\n", unitid); | ||
1197 | return -EINVAL; | ||
1198 | } | ||
1194 | channels = (hdr->bLength - 7) / csize - 1; | 1199 | channels = (hdr->bLength - 7) / csize - 1; |
1195 | bmaControls = hdr->bmaControls; | 1200 | bmaControls = hdr->bmaControls; |
1196 | } else { | 1201 | } else { |