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

USB: fix usb_unlink_urb() usage in whiteheat driver

Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent c4c3ce8e
......@@ -680,7 +680,7 @@ static void whiteheat_close(struct usb_serial_port *port, struct file * filp)
list_for_each_safe(tmp, tmp2, &info->rx_urbs_submitted) {
wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
urb = wrap->urb;
usb_unlink_urb(urb);
usb_kill_urb(urb);
list_del(tmp);
list_add(tmp, &info->rx_urbs_free);
}
......@@ -691,7 +691,7 @@ static void whiteheat_close(struct usb_serial_port *port, struct file * filp)
list_for_each_safe(tmp, tmp2, &info->tx_urbs_submitted) {
wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
urb = wrap->urb;
usb_unlink_urb(urb);
usb_kill_urb(urb);
list_del(tmp);
list_add(tmp, &info->tx_urbs_free);
}
......@@ -1344,7 +1344,7 @@ static void stop_command_port(struct usb_serial *serial)
spin_lock_irqsave(&command_info->lock, flags);
command_info->port_running--;
if (!command_info->port_running)
usb_unlink_urb(command_port->read_urb);
usb_kill_urb(command_port->read_urb);
spin_unlock_irqrestore(&command_info->lock, flags);
}
......@@ -1372,7 +1372,7 @@ static int start_port_read(struct usb_serial_port *port)
list_for_each_safe(tmp, tmp2, &info->rx_urbs_submitted) {
wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
urb = wrap->urb;
usb_unlink_urb(urb);
usb_kill_urb(urb);
list_del(tmp);
list_add(tmp, &info->rx_urbs_free);
}
......
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