提交 95d43166 编写于 作者: M Mariusz Kozlowski 提交者: Greg Kroah-Hartman

usb: usb-serial 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>
上级 9aac10ff
......@@ -952,32 +952,28 @@ int usb_serial_probe(struct usb_interface *interface,
port = serial->port[i];
if (!port)
continue;
if (port->read_urb)
usb_free_urb (port->read_urb);
usb_free_urb(port->read_urb);
kfree(port->bulk_in_buffer);
}
for (i = 0; i < num_bulk_out; ++i) {
port = serial->port[i];
if (!port)
continue;
if (port->write_urb)
usb_free_urb (port->write_urb);
usb_free_urb(port->write_urb);
kfree(port->bulk_out_buffer);
}
for (i = 0; i < num_interrupt_in; ++i) {
port = serial->port[i];
if (!port)
continue;
if (port->interrupt_in_urb)
usb_free_urb (port->interrupt_in_urb);
usb_free_urb(port->interrupt_in_urb);
kfree(port->interrupt_in_buffer);
}
for (i = 0; i < num_interrupt_out; ++i) {
port = serial->port[i];
if (!port)
continue;
if (port->interrupt_out_urb)
usb_free_urb (port->interrupt_out_urb);
usb_free_urb(port->interrupt_out_urb);
kfree(port->interrupt_out_buffer);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册