diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-05 17:41:16 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-05 17:41:16 +0100 |
commit | c8d204b38a558d74fafb6915e2593602b7f4b823 (patch) | |
tree | d4e076845e4d6dfbef70b1f4740e8fa246958059 /drivers/usb/serial/ti_usb_3410_5052.c | |
parent | 29fc1aa454d0603493b47a8e2410ae6e9ab20258 (diff) | |
parent | ef079936d3cd09e63612834fe2698eeada0d8e3f (diff) | |
download | op-kernel-dev-c8d204b38a558d74fafb6915e2593602b7f4b823.zip op-kernel-dev-c8d204b38a558d74fafb6915e2593602b7f4b823.tar.gz |
Merge tag 'usb-serial-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes:
USB-serial fixes for v4.10-rc3
These fixes address a number of long-standing issues in various
USB-serial drivers which would lead to crashes should a malicious device
lack the expected endpoints.
Included are also a few related fixes, and a couple of unrelated ones
that were found during my survey (e.g. a memleak and a
sleep-while-atomic).
A compiler warning revealed an error-handling issue in the new f81534
driver which is also fixed.
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/ti_usb_3410_5052.c')
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 8db9d07..64b85b8 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -579,6 +579,13 @@ static int ti_startup(struct usb_serial *serial) goto free_tdev; } + if (serial->num_bulk_in < serial->num_ports || + serial->num_bulk_out < serial->num_ports) { + dev_err(&serial->interface->dev, "missing endpoints\n"); + status = -ENODEV; + goto free_tdev; + } + return 0; free_tdev: |