diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:33 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:33 +0800 |
commit | 156f7b56ee4b918b95991750e0f34da8ad416eae (patch) | |
tree | fd47da260b3c78631721f36edf01b2878358283a /drivers/usb/serial/io_ti.c | |
parent | 2e2fb031287a5946d97b85769f80ca60f0166e15 (diff) | |
parent | d97f745e1d2fea4d2f308e5e06eee81a9a84f3f5 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-rtlsk-v4.1-17.06-rtlsk-v4.1-17.05-rtlsk-v4.1-17.03-rtlinux-linaro-lsk-v4.1-rt
Diffstat (limited to 'drivers/usb/serial/io_ti.c')
-rw-r--r-- | drivers/usb/serial/io_ti.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index ddbb8fe1046d..2ef757f35162 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@ -2378,6 +2378,13 @@ static int edge_startup(struct usb_serial *serial) struct edgeport_serial *edge_serial; int status; + /* Make sure we have the required endpoints when in download mode. */ + if (serial->interface->cur_altsetting->desc.bNumEndpoints > 1) { + if (serial->num_bulk_in < serial->num_ports || + serial->num_bulk_out < serial->num_ports) + return -ENODEV; + } + /* create our private serial structure */ edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL); if (!edge_serial) |