Commit 48f9435b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: fix usb_unlink_urb() usage in usb-serial core

Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent d2e1a8d0
......@@ -455,15 +455,15 @@ static void destroy_serial(struct kref *kref)
if (!port)
continue;
if (port->read_urb) {
usb_unlink_urb(port->read_urb);
usb_kill_urb(port->read_urb);
usb_free_urb(port->read_urb);
}
if (port->write_urb) {
usb_unlink_urb(port->write_urb);
usb_kill_urb(port->write_urb);
usb_free_urb(port->write_urb);
}
if (port->interrupt_in_urb) {
usb_unlink_urb(port->interrupt_in_urb);
usb_kill_urb(port->interrupt_in_urb);
usb_free_urb(port->interrupt_in_urb);
}
kfree(port->bulk_in_buffer);
......@@ -819,15 +819,15 @@ static void port_release(struct device *dev)
dbg ("%s - %s", __FUNCTION__, dev->bus_id);
if (port->read_urb) {
usb_unlink_urb(port->read_urb);
usb_kill_urb(port->read_urb);
usb_free_urb(port->read_urb);
}
if (port->write_urb) {
usb_unlink_urb(port->write_urb);
usb_kill_urb(port->write_urb);
usb_free_urb(port->write_urb);
}
if (port->interrupt_in_urb) {
usb_unlink_urb(port->interrupt_in_urb);
usb_kill_urb(port->interrupt_in_urb);
usb_free_urb(port->interrupt_in_urb);
}
kfree(port->bulk_in_buffer);
......
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