aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-02-05 08:48:03 -0500
committerTakashi Iwai <tiwai@suse.de>2013-02-05 08:48:03 -0500
commit2faea5274f079630991800bd579f85a621f96ef5 (patch)
tree4afb9032f0ae3a3e8b539e0abe40cda320989ac3 /sound/usb
parent16c5ab1d3a6d1b11ed2966fa33a3a4fecd13a2bc (diff)
parentedac894389f9c9de2a1368c78809c824b343f3a5 (diff)
Merge branch 'for-linus' into for-next
Merge pending fixes that haven't pulled into 3.8.
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/mixer.c17
-rw-r--r--sound/usb/quirks-table.h2
2 files changed, 13 insertions, 6 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index ed4d89c8b52a..e90daf8cdaa8 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1331,16 +1331,23 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void
1331 } 1331 }
1332 channels = (hdr->bLength - 7) / csize - 1; 1332 channels = (hdr->bLength - 7) / csize - 1;
1333 bmaControls = hdr->bmaControls; 1333 bmaControls = hdr->bmaControls;
1334 if (hdr->bLength < 7 + csize) {
1335 snd_printk(KERN_ERR "usbaudio: unit %u: "
1336 "invalid UAC_FEATURE_UNIT descriptor\n",
1337 unitid);
1338 return -EINVAL;
1339 }
1334 } else { 1340 } else {
1335 struct uac2_feature_unit_descriptor *ftr = _ftr; 1341 struct uac2_feature_unit_descriptor *ftr = _ftr;
1336 csize = 4; 1342 csize = 4;
1337 channels = (hdr->bLength - 6) / 4 - 1; 1343 channels = (hdr->bLength - 6) / 4 - 1;
1338 bmaControls = ftr->bmaControls; 1344 bmaControls = ftr->bmaControls;
1339 } 1345 if (hdr->bLength < 6 + csize) {
1340 1346 snd_printk(KERN_ERR "usbaudio: unit %u: "
1341 if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { 1347 "invalid UAC_FEATURE_UNIT descriptor\n",
1342 snd_printk(KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT descriptor\n", unitid); 1348 unitid);
1343 return -EINVAL; 1349 return -EINVAL;
1350 }
1344 } 1351 }
1345 1352
1346 /* parse the source unit */ 1353 /* parse the source unit */
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 64d25a7a4d59..820580a6dfc3 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -1750,7 +1750,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1750 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1750 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1751 /* .vendor_name = "Roland", */ 1751 /* .vendor_name = "Roland", */
1752 /* .product_name = "A-PRO", */ 1752 /* .product_name = "A-PRO", */
1753 .ifnum = 1, 1753 .ifnum = 0,
1754 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1754 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1755 .data = & (const struct snd_usb_midi_endpoint_info) { 1755 .data = & (const struct snd_usb_midi_endpoint_info) {
1756 .out_cables = 0x0003, 1756 .out_cables = 0x0003,