diff options
| author | Nathan Scott <nathans@bruce> | 2006-03-22 15:31:14 +1100 |
|---|---|---|
| committer | Nathan Scott <nathans@bruce> | 2006-03-22 15:31:14 +1100 |
| commit | 4d74f423c722b8cadfabe087369200013b217b67 (patch) | |
| tree | d62facddfdb0dfd89f3e61f4fc699cf2feb4b082 /drivers/usb/serial/usb-serial.c | |
| parent | bb19fba1937cb6ab2bb98ac893365f6ebf88ef1b (diff) | |
| parent | e952f31bce6e9f64db01f607abc46529ba57ac9e (diff) | |
Merge HEAD from ../linux-2.6
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
| -rw-r--r-- | drivers/usb/serial/usb-serial.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index b5c96e74a903..097f4e8488fe 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -564,12 +564,11 @@ static struct usb_serial * create_serial (struct usb_device *dev, { struct usb_serial *serial; - serial = kmalloc (sizeof (*serial), GFP_KERNEL); + serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__); return NULL; } - memset (serial, 0, sizeof(*serial)); serial->dev = usb_get_dev(dev); serial->type = driver; serial->interface = interface; @@ -778,10 +777,9 @@ int usb_serial_probe(struct usb_interface *interface, serial->num_port_pointers = max_endpoints; dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints); for (i = 0; i < max_endpoints; ++i) { - port = kmalloc(sizeof(struct usb_serial_port), GFP_KERNEL); + port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL); if (!port) goto probe_error; - memset(port, 0x00, sizeof(struct usb_serial_port)); port->number = i + serial->minor; port->serial = serial; spin_lock_init(&port->lock); |
