usb: keyspan 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>
This commit is contained in:
Mariusz Kozlowski 2006-11-08 15:36:34 +01:00 committed by Greg Kroah-Hartman
parent 9a25f44f91
commit 1cadc1378f

View file

@ -2306,21 +2306,15 @@ 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);
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);
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]);
}
}