diff options
author | Oliver Neukum <oliver@neukum.org> | 2005-10-24 16:42:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 19:47:49 -0400 |
commit | 46f116eab81b21c6ae8c4f169498c632b1f94bf1 (patch) | |
tree | b5165e2e57748140be4dc3fbf7063fdba721c26c /drivers/usb/class/cdc-acm.c | |
parent | eb3c5ed8617d0aa67648cb7d1a486d14099129f2 (diff) |
[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/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 5 |
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: | |||
827 | return -ENODEV; | 827 | return -ENODEV; |
828 | } | 828 | } |
829 | 829 | ||
830 | if (!(acm = kmalloc(sizeof(struct acm), GFP_KERNEL))) { | 830 | if (!(acm = kzalloc(sizeof(struct acm), GFP_KERNEL))) { |
831 | dev_dbg(&intf->dev, "out of memory (acm kmalloc)\n"); | 831 | dev_dbg(&intf->dev, "out of memory (acm kzalloc)\n"); |
832 | goto alloc_fail; | 832 | goto alloc_fail; |
833 | } | 833 | } |
834 | memset(acm, 0, sizeof(struct acm)); | ||
835 | 834 | ||
836 | ctrlsize = le16_to_cpu(epctrl->wMaxPacketSize); | 835 | ctrlsize = le16_to_cpu(epctrl->wMaxPacketSize); |
837 | readsize = le16_to_cpu(epread->wMaxPacketSize); | 836 | readsize = le16_to_cpu(epread->wMaxPacketSize); |