summaryrefslogtreecommitdiffstats
path: root/sound/usb/bcd2000/bcd2000.c
diff options
context:
space:
mode:
authorTakashi Iwai2017-11-13 15:43:04 +0100
committerTakashi Iwai2017-11-13 15:43:13 +0100
commitc429bda21ffafb28f02fb2eb4055b4ab6879ed58 (patch)
tree80715bf534bfa3bcb69ef77cf1dc5f9d98919b44 /sound/usb/bcd2000/bcd2000.c
parentALSA: hda - fix headset mic problem for Dell machines with alc274 (diff)
parentALSA: ice1712: define i2c eeprom addr to header file (diff)
downloadkernel-qcow2-linux-c429bda21ffafb28f02fb2eb4055b4ab6879ed58.tar.gz
kernel-qcow2-linux-c429bda21ffafb28f02fb2eb4055b4ab6879ed58.tar.xz
kernel-qcow2-linux-c429bda21ffafb28f02fb2eb4055b4ab6879ed58.zip
Merge branch 'for-next' into for-linus
Pull 4.15 updates to take over the previous urgent fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/bcd2000/bcd2000.c')
-rw-r--r--sound/usb/bcd2000/bcd2000.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/usb/bcd2000/bcd2000.c b/sound/usb/bcd2000/bcd2000.c
index 7371e5b06035..a6408209d7f1 100644
--- a/sound/usb/bcd2000/bcd2000.c
+++ b/sound/usb/bcd2000/bcd2000.c
@@ -342,6 +342,13 @@ static int bcd2000_init_midi(struct bcd2000 *bcd2k)
bcd2k->midi_out_buf, BUFSIZE,
bcd2000_output_complete, bcd2k, 1);
+ /* sanity checks of EPs before actually submitting */
+ if (usb_urb_ep_type_check(bcd2k->midi_in_urb) ||
+ usb_urb_ep_type_check(bcd2k->midi_out_urb)) {
+ dev_err(&bcd2k->dev->dev, "invalid MIDI EP\n");
+ return -EINVAL;
+ }
+
bcd2000_init_device(bcd2k);
return 0;