diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:26 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:26 +0800 |
commit | d97f745e1d2fea4d2f308e5e06eee81a9a84f3f5 (patch) | |
tree | 1a24a0ad0c33e1d6344d2454b61748afb74a6693 /drivers/usb/serial/io_ti.c | |
parent | cb370744bc101be91a0bc3e9fbdb670ab44df97d (diff) | |
parent | d9e0350d2575a20ee7783427da9bd6b6107eb983 (diff) |
Merge tag 'v4.1.39' into linux-linaro-lsk-v4.1lsk-v4.1-17.03
This is the 4.1.39 stable release
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) |