aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/option.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-27 15:29:43 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:59 -0500
commit80b6ca48321974a6566a1c9048ba34f60420bca6 (patch)
treea350e3cf6b794081c13c89d5b1913b2c1207570d /drivers/usb/serial/option.c
parentd54a5cb6484705f7808b337917cc7598f2f971c3 (diff)
[PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/option.c')
-rw-r--r--drivers/usb/serial/option.c3
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