diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2006-11-08 09:36:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 17:23:35 -0500 |
commit | 95d4316654a7e09778ebf81e03cab7040ecca1b0 (patch) | |
tree | 7597e3f3303704670e013408adfff61f77931741 /drivers/usb | |
parent | 9aac10ff1d9a228d05491f68f933cf6a41b9debc (diff) |
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')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 12 |
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: | |||
952 | port = serial->port[i]; | 952 | port = serial->port[i]; |
953 | if (!port) | 953 | if (!port) |
954 | continue; | 954 | continue; |
955 | if (port->read_urb) | 955 | usb_free_urb(port->read_urb); |
956 | usb_free_urb (port->read_urb); | ||
957 | kfree(port->bulk_in_buffer); | 956 | kfree(port->bulk_in_buffer); |
958 | } | 957 | } |
959 | for (i = 0; i < num_bulk_out; ++i) { | 958 | for (i = 0; i < num_bulk_out; ++i) { |
960 | port = serial->port[i]; | 959 | port = serial->port[i]; |
961 | if (!port) | 960 | if (!port) |
962 | continue; | 961 | continue; |
963 | if (port->write_urb) | 962 | usb_free_urb(port->write_urb); |
964 | usb_free_urb (port->write_urb); | ||
965 | kfree(port->bulk_out_buffer); | 963 | kfree(port->bulk_out_buffer); |
966 | } | 964 | } |
967 | for (i = 0; i < num_interrupt_in; ++i) { | 965 | for (i = 0; i < num_interrupt_in; ++i) { |
968 | port = serial->port[i]; | 966 | port = serial->port[i]; |
969 | if (!port) | 967 | if (!port) |
970 | continue; | 968 | continue; |
971 | if (port->interrupt_in_urb) | 969 | usb_free_urb(port->interrupt_in_urb); |
972 | usb_free_urb (port->interrupt_in_urb); | ||
973 | kfree(port->interrupt_in_buffer); | 970 | kfree(port->interrupt_in_buffer); |
974 | } | 971 | } |
975 | for (i = 0; i < num_interrupt_out; ++i) { | 972 | for (i = 0; i < num_interrupt_out; ++i) { |
976 | port = serial->port[i]; | 973 | port = serial->port[i]; |
977 | if (!port) | 974 | if (!port) |
978 | continue; | 975 | continue; |
979 | if (port->interrupt_out_urb) | 976 | usb_free_urb(port->interrupt_out_urb); |
980 | usb_free_urb (port->interrupt_out_urb); | ||
981 | kfree(port->interrupt_out_buffer); | 977 | kfree(port->interrupt_out_buffer); |
982 | } | 978 | } |
983 | 979 | ||