Skip to content

Commit

Permalink
usb: usb-serial free urb cleanup
Browse files Browse the repository at this point in the history
- usb_free_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mariusz Kozlowski authored and Greg Kroah-Hartman committed Dec 1, 2006
1 parent 9aac10f commit 95d4316
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,32 +952,28 @@ int usb_serial_probe(struct usb_interface *interface,
port = serial->port[i];
if (!port)
continue;
if (port->read_urb)
usb_free_urb (port->read_urb);
usb_free_urb(port->read_urb);
kfree(port->bulk_in_buffer);
}
for (i = 0; i < num_bulk_out; ++i) {
port = serial->port[i];
if (!port)
continue;
if (port->write_urb)
usb_free_urb (port->write_urb);
usb_free_urb(port->write_urb);
kfree(port->bulk_out_buffer);
}
for (i = 0; i < num_interrupt_in; ++i) {
port = serial->port[i];
if (!port)
continue;
if (port->interrupt_in_urb)
usb_free_urb (port->interrupt_in_urb);
usb_free_urb(port->interrupt_in_urb);
kfree(port->interrupt_in_buffer);
}
for (i = 0; i < num_interrupt_out; ++i) {
port = serial->port[i];
if (!port)
continue;
if (port->interrupt_out_urb)
usb_free_urb (port->interrupt_out_urb);
usb_free_urb(port->interrupt_out_urb);
kfree(port->interrupt_out_buffer);
}

Expand Down

0 comments on commit 95d4316

Please sign in to comment.