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 3f29e6b0fd19..b606c5968102 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -2725,12 +2725,11 @@ static int edge_startup (struct usb_serial *serial) | |||
2725 | dev = serial->dev; | 2725 | dev = serial->dev; |
2726 | 2726 | ||
2727 | /* create our private serial structure */ | 2727 | /* create our private serial structure */ |
2728 | edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL); | 2728 | edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL); |
2729 | if (edge_serial == NULL) { | 2729 | if (edge_serial == NULL) { |
2730 | dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); | 2730 | dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); |
2731 | return -ENOMEM; | 2731 | return -ENOMEM; |
2732 | } | 2732 | } |
2733 | memset (edge_serial, 0, sizeof(struct edgeport_serial)); | ||
2734 | spin_lock_init(&edge_serial->es_lock); | 2733 | spin_lock_init(&edge_serial->es_lock); |
2735 | edge_serial->serial = serial; | 2734 | edge_serial->serial = serial; |
2736 | usb_set_serial_data(serial, edge_serial); | 2735 | usb_set_serial_data(serial, edge_serial); |