diff options
-rw-r--r-- | drivers/usb/serial/io_ti.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 0d3903691e8c..b8670905bc3a 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
@@ -2794,16 +2794,14 @@ static void edge_shutdown (struct usb_serial *serial) | |||
2794 | 2794 | ||
2795 | dbg ("%s", __FUNCTION__); | 2795 | dbg ("%s", __FUNCTION__); |
2796 | 2796 | ||
2797 | for (i=0; i < serial->num_ports; ++i) { | 2797 | for (i = 0; i < serial->num_ports; ++i) { |
2798 | edge_port = usb_get_serial_port_data(serial->port[i]); | 2798 | edge_port = usb_get_serial_port_data(serial->port[i]); |
2799 | edge_remove_sysfs_attrs(edge_port->port); | 2799 | edge_remove_sysfs_attrs(edge_port->port); |
2800 | if (edge_port) { | 2800 | edge_buf_free(edge_port->ep_out_buf); |
2801 | edge_buf_free(edge_port->ep_out_buf); | 2801 | kfree(edge_port); |
2802 | kfree(edge_port); | ||
2803 | } | ||
2804 | usb_set_serial_port_data(serial->port[i], NULL); | 2802 | usb_set_serial_port_data(serial->port[i], NULL); |
2805 | } | 2803 | } |
2806 | kfree (usb_get_serial_data(serial)); | 2804 | kfree(usb_get_serial_data(serial)); |
2807 | usb_set_serial_data(serial, NULL); | 2805 | usb_set_serial_data(serial, NULL); |
2808 | } | 2806 | } |
2809 | 2807 | ||