Commit d2e1a8d0 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: fix usb_unlink_urb() usage in pl2303 driver

Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 03ef9d05
...@@ -621,7 +621,6 @@ static void pl2303_close (struct usb_serial_port *port, struct file *filp) ...@@ -621,7 +621,6 @@ static void pl2303_close (struct usb_serial_port *port, struct file *filp)
struct pl2303_private *priv = usb_get_serial_port_data(port); struct pl2303_private *priv = usb_get_serial_port_data(port);
unsigned long flags; unsigned long flags;
unsigned int c_cflag; unsigned int c_cflag;
int result;
int bps; int bps;
long timeout; long timeout;
wait_queue_t wait; \ wait_queue_t wait; \
...@@ -666,23 +665,9 @@ static void pl2303_close (struct usb_serial_port *port, struct file *filp) ...@@ -666,23 +665,9 @@ static void pl2303_close (struct usb_serial_port *port, struct file *filp)
/* shutdown our urbs */ /* shutdown our urbs */
dbg("%s - shutting down urbs", __FUNCTION__); dbg("%s - shutting down urbs", __FUNCTION__);
result = usb_unlink_urb (port->write_urb); usb_kill_urb(port->write_urb);
if (result) usb_kill_urb(port->read_urb);
dbg("%s - usb_unlink_urb (write_urb)" usb_kill_urb(port->interrupt_in_urb);
" failed with reason: %d", __FUNCTION__,
result);
result = usb_unlink_urb (port->read_urb);
if (result)
dbg("%s - usb_unlink_urb (read_urb) "
"failed with reason: %d", __FUNCTION__,
result);
result = usb_unlink_urb (port->interrupt_in_urb);
if (result)
dbg("%s - usb_unlink_urb (interrupt_in_urb)"
" failed with reason: %d", __FUNCTION__,
result);
if (port->tty) { if (port->tty) {
c_cflag = port->tty->termios->c_cflag; c_cflag = port->tty->termios->c_cflag;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment