X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Foption.c;h=fd8a50e081d15f2ff758146785a2490f1ce85b56;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=5cf2b80add7aa01ede3b1a588dc5c002d6dbccb8;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 5cf2b80ad..fd8a50e08 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -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 @@ -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);