aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ftdi_sio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r--drivers/usb/serial/ftdi_sio.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 4afd905fe2fe..4c788c767a97 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1347,9 +1347,7 @@ static int ftdi_common_startup (struct usb_serial *serial)
1347 priv->flags = ASYNC_LOW_LATENCY; 1347 priv->flags = ASYNC_LOW_LATENCY;
1348 1348
1349 /* Increase the size of read buffers */ 1349 /* Increase the size of read buffers */
1350 if (port->bulk_in_buffer) { 1350 kfree(port->bulk_in_buffer);
1351 kfree (port->bulk_in_buffer);
1352 }
1353 port->bulk_in_buffer = kmalloc (BUFSZ, GFP_KERNEL); 1351 port->bulk_in_buffer = kmalloc (BUFSZ, GFP_KERNEL);
1354 if (!port->bulk_in_buffer) { 1352 if (!port->bulk_in_buffer) {
1355 kfree (priv); 1353 kfree (priv);
@@ -1365,10 +1363,8 @@ static int ftdi_common_startup (struct usb_serial *serial)
1365 usb_free_urb (port->write_urb); 1363 usb_free_urb (port->write_urb);
1366 port->write_urb = NULL; 1364 port->write_urb = NULL;
1367 } 1365 }
1368 if (port->bulk_out_buffer) { 1366 kfree(port->bulk_out_buffer);
1369 kfree (port->bulk_out_buffer); 1367 port->bulk_out_buffer = NULL;
1370 port->bulk_out_buffer = NULL;
1371 }
1372 1368
1373 usb_set_serial_port_data(serial->port[0], priv); 1369 usb_set_serial_port_data(serial->port[0], priv);
1374 1370