diff options
Diffstat (limited to 'drivers/usb/serial/io_edgeport.c')
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 3ef8df0ef888..76e6fb3aab7a 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -3020,7 +3020,7 @@ static int edge_startup(struct usb_serial *serial) | |||
3020 | 3020 | ||
3021 | /* set up our port private structures */ | 3021 | /* set up our port private structures */ |
3022 | for (i = 0; i < serial->num_ports; ++i) { | 3022 | for (i = 0; i < serial->num_ports; ++i) { |
3023 | edge_port = kmalloc(sizeof(struct edgeport_port), GFP_KERNEL); | 3023 | edge_port = kzalloc(sizeof(struct edgeport_port), GFP_KERNEL); |
3024 | if (edge_port == NULL) { | 3024 | if (edge_port == NULL) { |
3025 | dev_err(&serial->dev->dev, "%s - Out of memory\n", | 3025 | dev_err(&serial->dev->dev, "%s - Out of memory\n", |
3026 | __func__); | 3026 | __func__); |
@@ -3033,7 +3033,6 @@ static int edge_startup(struct usb_serial *serial) | |||
3033 | kfree(edge_serial); | 3033 | kfree(edge_serial); |
3034 | return -ENOMEM; | 3034 | return -ENOMEM; |
3035 | } | 3035 | } |
3036 | memset(edge_port, 0, sizeof(struct edgeport_port)); | ||
3037 | spin_lock_init(&edge_port->ep_lock); | 3036 | spin_lock_init(&edge_port->ep_lock); |
3038 | edge_port->port = serial->port[i]; | 3037 | edge_port->port = serial->port[i]; |
3039 | usb_set_serial_port_data(serial->port[i], edge_port); | 3038 | usb_set_serial_port_data(serial->port[i], edge_port); |