mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
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:
parent
9a25f44f91
commit
1cadc1378f
1 changed files with 6 additions and 12 deletions
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue