]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: serial: replace runtime overflow check
authorJohan Hovold <johan@kernel.org>
Thu, 2 Mar 2017 11:51:18 +0000 (12:51 +0100)
committerJohan Hovold <johan@kernel.org>
Thu, 16 Mar 2017 09:33:41 +0000 (10:33 +0100)
commit8520ac0d70d6c1709bf6768cb79f3b75115def09
treef0df836e960e63e1384e92e576edb8e286712b13
parentff0c5703a4b11fca86886e5b7ce40c396bef8381
USB: serial: replace runtime overflow check

Since commit 0a8fd1346254 ("USB: fix problems with duplicate endpoint
addresses") USB core guarantees that there are no more than 15 endpoint
descriptors per type (and altsetting) so the corresponding overflow
checks can now be replaced with a compile-time check on the array sizes
(and indirectly the maximum number of ports).

Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/usb-serial.c