linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / usb / serial / option.c
index 5cf2b80..fd8a50e 100644 (file)
@@ -28,7 +28,6 @@
   2005-09-10  v0.4.3 added HUAWEI E600 card and Audiovox AirCard
   2005-09-20  v0.4.4 increased recv buffer size: the card sometimes
                      wants to send >2000 bytes.
-  2006-04-10  v0.4.2 fixed two array overrun errors :-/
 
   Work sponsored by: Sigos GmbH, Germany <info@sigos.de>
 
@@ -103,7 +102,7 @@ static struct usb_driver option_driver = {
        .no_dynamic_id =        1,
 };
 
-/* The card has three separate interfaces, which the serial driver
+/* The card has three separate interfaces, wich the serial driver
  * recognizes separately, thus num_port=1.
  */
 static struct usb_serial_driver option_3port_device = {
@@ -632,12 +631,13 @@ static int option_startup(struct usb_serial *serial)
        /* Now setup per port private data */
        for (i = 0; i < serial->num_ports; i++) {
                port = serial->port[i];
-               portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
+               portdata = kmalloc(sizeof(*portdata), GFP_KERNEL);
                if (!portdata) {
                        dbg("%s: kmalloc for option_port_private (%d) failed!.",
                                        __FUNCTION__, i);
                        return (1);
                }
+               memset(portdata, 0, sizeof(struct option_port_private));
 
                usb_set_serial_port_data(port, portdata);