usb: keyspan free urb cleanup
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Wed, 8 Nov 2006 14:36:34 +0000 (15:36 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:23:34 +0000 (14:23 -0800)
- usb_free_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/keyspan.c

index 53be824eb1bf2070e0e666ea67313de07de035c8..7639652cec42f84e94356c6f453efbe9593ed27d 100644 (file)
@@ -2306,22 +2306,16 @@ static void keyspan_shutdown (struct usb_serial *serial)
        }
 
        /* Now free them */
-       if (s_priv->instat_urb)
-               usb_free_urb(s_priv->instat_urb);
-       if (s_priv->glocont_urb)
-               usb_free_urb(s_priv->glocont_urb);
+       usb_free_urb(s_priv->instat_urb);
+       usb_free_urb(s_priv->glocont_urb);
        for (i = 0; i < serial->num_ports; ++i) {
                port = serial->port[i];
                p_priv = usb_get_serial_port_data(port);
-               if (p_priv->inack_urb)
-                       usb_free_urb(p_priv->inack_urb);
-               if (p_priv->outcont_urb)
-                       usb_free_urb(p_priv->outcont_urb);
+               usb_free_urb(p_priv->inack_urb);
+               usb_free_urb(p_priv->outcont_urb);
                for (j = 0; j < 2; j++) {
-                       if (p_priv->in_urbs[j])
-                               usb_free_urb(p_priv->in_urbs[j]);
-                       if (p_priv->out_urbs[j])
-                               usb_free_urb(p_priv->out_urbs[j]);
+                       usb_free_urb(p_priv->in_urbs[j]);
+                       usb_free_urb(p_priv->out_urbs[j]);
                }
        }