]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
USB: serial: metro-usb: add missing interrupt-out endpoint check
authorJohan Hovold <johan@kernel.org>
Thu, 12 Oct 2017 08:54:23 +0000 (10:54 +0200)
committerJohan Hovold <johan@kernel.org>
Fri, 13 Oct 2017 07:45:09 +0000 (09:45 +0200)
commitee13a25fc355650b3acf43857b7a496eb6b07f0b
tree748ff505fb70d5a48a75ae9923151260a034b845
parent6f792f471fad3ed16aca9ccedacdcd48fbedf7a9
USB: serial: metro-usb: add missing interrupt-out endpoint check

One class of "unidirectional" devices managed by this driver uses an
interrupt-out endpoint to send control messages at open and close. Due
to a missing endpoint sanity check, this could result in an interrupt
URB being submitted to endpoint 0 instead. This would be caught by
USB core (without a WARN dump), but let's verify that the expected
endpoints are present at probe rather than when a port is later opened.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/metro-usb.c