提交 1bc77f4d 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: cyberjack: remove bogus disconnect test in close

Remove bogus (and unnecessary) test for serial->dev being NULL in close.

The device is never cleared, and close is never called after a completed
disconnect anyway.
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5c327528
......@@ -166,11 +166,8 @@ static int cyberjack_open(struct tty_struct *tty,
static void cyberjack_close(struct usb_serial_port *port)
{
if (port->serial->dev) {
/* shutdown any bulk reads that might be going on */
usb_kill_urb(port->write_urb);
usb_kill_urb(port->read_urb);
}
usb_kill_urb(port->write_urb);
usb_kill_urb(port->read_urb);
}
static int cyberjack_write(struct tty_struct *tty,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册