OSDN Git Service

USB: serial: metro-usb: stop I/O after failed open
authorJohan Hovold <johan@kernel.org>
Thu, 12 Oct 2017 08:54:21 +0000 (10:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Nov 2017 08:49:22 +0000 (09:49 +0100)
commitb55d4612484e516ce2e9804db619f7aa66ecb5e7
tree99e0cece0427606ef332f075ffdd7d3760dfd946
parentd74d586746ccf743df309ed2c9a4232e858dbd68
USB: serial: metro-usb: stop I/O after failed open

commit 2339536d229df25c71c0900fc619289229bfecf6 upstream.

Make sure to kill the interrupt-in URB after a failed open request.
Apart from saving power (and avoiding stale input after a later
successful open), this also prevents a NULL-deref in the completion
handler if the port is manually unbound.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: 704577861d5e ("USB: serial: metro-usb: get data from device in Uni-Directional mode.")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/metro-usb.c