提交 1cadc137 编写于 作者: M Mariusz Kozlowski 提交者: Greg Kroah-Hartman

usb: keyspan free urb cleanup

- usb_free_urb() cleanup
Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 9a25f44f
......@@ -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]);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册