mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-19 11:43:40 +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
@ -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…
x
Reference in New Issue
Block a user