summaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2006-11-08 15:36:51 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 14:23:35 -0800
commit95d4316654a7e09778ebf81e03cab7040ecca1b0 (patch)
tree7597e3f3303704670e013408adfff61f77931741 /drivers/usb/serial
parent9aac10ff1d9a228d05491f68f933cf6a41b9debc (diff)
downloadlwn-95d4316654a7e09778ebf81e03cab7040ecca1b0.tar.gz
lwn-95d4316654a7e09778ebf81e03cab7040ecca1b0.zip
usb: usb-serial free urb cleanup
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/usb-serial.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 8006e51c34bb..c1257d5292f5 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -952,32 +952,28 @@ probe_error:
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);
}