[PATCH] USB: cdc-acm patch to use kzalloc

another one to use kzalloc. Please apply.

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---
commit 46f116eab81b21c6ae8c4f169498c632b1f94bf1
tree b5165e2e57748140be4dc3fbf7063fdba721c26c
parent eb3c5ed8617d0aa67648cb7d1a486d14099129f2
author Oliver Neukum <[EMAIL PROTECTED]> Mon, 24 Oct 2005 22:42:35 +0200
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Fri, 28 Oct 2005 16:47:49 -0700

 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 16ecad3..1b47514 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);



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to