ChangeSet 1.2000.6.3, 2004/10/20 15:31:02-07:00, [EMAIL PROTECTED]

USB: remove unneeded checks in the usb-serial core.

Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/serial/usb-serial.c |   36 ++++++++++++------------------------
 1 files changed, 12 insertions(+), 24 deletions(-)


diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c   2004-10-22 16:16:00 -07:00
+++ b/drivers/usb/serial/usb-serial.c   2004-10-22 16:16:00 -07:00
@@ -452,18 +452,12 @@
                        port = serial->port[i];
                        if (!port)
                                continue;
-                       if (port->read_urb) {
-                               usb_kill_urb(port->read_urb);
-                               usb_free_urb(port->read_urb);
-                       }
-                       if (port->write_urb) {
-                               usb_kill_urb(port->write_urb);
-                               usb_free_urb(port->write_urb);
-                       }
-                       if (port->interrupt_in_urb) {
-                               usb_kill_urb(port->interrupt_in_urb);
-                               usb_free_urb(port->interrupt_in_urb);
-                       }
+                       usb_kill_urb(port->read_urb);
+                       usb_free_urb(port->read_urb);
+                       usb_kill_urb(port->write_urb);
+                       usb_free_urb(port->write_urb);
+                       usb_kill_urb(port->interrupt_in_urb);
+                       usb_free_urb(port->interrupt_in_urb);
                        kfree(port->bulk_in_buffer);
                        kfree(port->bulk_out_buffer);
                        kfree(port->interrupt_in_buffer);
@@ -799,18 +793,12 @@
        struct usb_serial_port *port = to_usb_serial_port(dev);
 
        dbg ("%s - %s", __FUNCTION__, dev->bus_id);
-       if (port->read_urb) {
-               usb_kill_urb(port->read_urb);
-               usb_free_urb(port->read_urb);
-       }
-       if (port->write_urb) {
-               usb_kill_urb(port->write_urb);
-               usb_free_urb(port->write_urb);
-       }
-       if (port->interrupt_in_urb) {
-               usb_kill_urb(port->interrupt_in_urb);
-               usb_free_urb(port->interrupt_in_urb);
-       }
+       usb_kill_urb(port->read_urb);
+       usb_free_urb(port->read_urb);
+       usb_kill_urb(port->write_urb);
+       usb_free_urb(port->write_urb);
+       usb_kill_urb(port->interrupt_in_urb);
+       usb_free_urb(port->interrupt_in_urb);
        kfree(port->bulk_in_buffer);
        kfree(port->bulk_out_buffer);
        kfree(port->interrupt_in_buffer);



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to