diff options
Diffstat (limited to 'drivers/usb/serial/option.c')
-rw-r--r-- | drivers/usb/serial/option.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 52bdf6fe46f2..a8455c9e79dd 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -631,13 +631,12 @@ static int option_startup(struct usb_serial *serial) | |||
631 | /* Now setup per port private data */ | 631 | /* Now setup per port private data */ |
632 | for (i = 0; i < serial->num_ports; i++) { | 632 | for (i = 0; i < serial->num_ports; i++) { |
633 | port = serial->port[i]; | 633 | port = serial->port[i]; |
634 | portdata = kmalloc(sizeof(*portdata), GFP_KERNEL); | 634 | portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); |
635 | if (!portdata) { | 635 | if (!portdata) { |
636 | dbg("%s: kmalloc for option_port_private (%d) failed!.", | 636 | dbg("%s: kmalloc for option_port_private (%d) failed!.", |
637 | __FUNCTION__, i); | 637 | __FUNCTION__, i); |
638 | return (1); | 638 | return (1); |
639 | } | 639 | } |
640 | memset(portdata, 0, sizeof(struct option_port_private)); | ||
641 | 640 | ||
642 | usb_set_serial_port_data(port, portdata); | 641 | usb_set_serial_port_data(port, portdata); |
643 | 642 | ||