OSDN Git Service

USB: serial: io_ti: fix I/O after disconnect
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:45 +0000 (16:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:22:45 +0000 (11:22 +0100)
commit11743d704e510d2f25b3a1bf81fbb2b103afefb4
treedf9a702ca6ed7bbf6ba00bace6dd4b6e590f3a17
parent7ef8807cce7d33a590a426d781f54730f45ca81f
USB: serial: io_ti: fix I/O after disconnect

commit 2330d0a853da260d8a9834a70df448032b9ff623 upstream.

Cancel the heartbeat work on driver unbind in order to avoid I/O after
disconnect in case the port is held open.

Note that the cancel in release() is still needed to stop the heartbeat
after late probe errors.

Fixes: 26c78daade0f ("USB: io_ti: Add heartbeat to keep idle EP/416 ports from disconnecting")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/io_ti.c