summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mos7840.c
diff options
context:
space:
mode:
authorBurman Yan2006-11-22 19:54:38 +0100
committerGreg Kroah-Hartman2006-12-01 23:25:51 +0100
commit7ac9da10af7ffd94cfd07e097b93d588bbd32b75 (patch)
tree335f931bb41e09ed9fff8c6bc4942f564c6a9ef3 /drivers/usb/serial/mos7840.c
parentUSB: hid-core: canonical defines for Apple USB device IDs (diff)
downloadkernel-qcow2-linux-7ac9da10af7ffd94cfd07e097b93d588bbd32b75.tar.gz
kernel-qcow2-linux-7ac9da10af7ffd94cfd07e097b93d588bbd32b75.tar.xz
kernel-qcow2-linux-7ac9da10af7ffd94cfd07e097b93d588bbd32b75.zip
USB serial: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/mos7840.c')
-rw-r--r--drivers/usb/serial/mos7840.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 5b71962d0351..02c89e10b2cf 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -2596,12 +2596,11 @@ static int mos7840_startup(struct usb_serial *serial)
/* set up port private structures */
for (i = 0; i < serial->num_ports; ++i) {
- mos7840_port = kmalloc(sizeof(struct moschip_port), GFP_KERNEL);
+ mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
if (mos7840_port == NULL) {
err("%s - Out of memory", __FUNCTION__);
return -ENOMEM;
}
- memset(mos7840_port, 0, sizeof(struct moschip_port));
/* Initialize all port interrupt end point to port 0 int endpoint *
* Our device has only one interrupt end point comman to all port */