summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2005-10-25 00:42:35 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-29 03:47:49 +0400
commit46f116eab81b21c6ae8c4f169498c632b1f94bf1 (patch)
treeb5165e2e57748140be4dc3fbf7063fdba721c26c /drivers
parenteb3c5ed8617d0aa67648cb7d1a486d14099129f2 (diff)
downloadlinux-46f116eab81b21c6ae8c4f169498c632b1f94bf1.tar.xz
[PATCH] USB: cdc-acm patch to use kzalloc
another one to use kzalloc. Please apply. Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/class/cdc-acm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 16ecad30e29c..1b4751412970 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -827,11 +827,10 @@ skip_normal_probe:
return -ENODEV;
}
- if (!(acm = kmalloc(sizeof(struct acm), GFP_KERNEL))) {
- dev_dbg(&intf->dev, "out of memory (acm kmalloc)\n");
+ if (!(acm = kzalloc(sizeof(struct acm), GFP_KERNEL))) {
+ dev_dbg(&intf->dev, "out of memory (acm kzalloc)\n");
goto alloc_fail;
}
- memset(acm, 0, sizeof(struct acm));
ctrlsize = le16_to_cpu(epctrl->wMaxPacketSize);
readsize = le16_to_cpu(epread->wMaxPacketSize);