Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=66eb2e93b99b79bd3d55ecea2098a8369c1ded0d
Commit:     66eb2e93b99b79bd3d55ecea2098a8369c1ded0d
Parent:     071e0a2aee9c289f50b9329d0c26474ca94f7c7a
Author:     Burman Yan <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 4 15:22:40 2006 -0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Wed Dec 20 10:14:26 2006 -0800

    USB AUERSWALD: replace kmalloc+memset with kzalloc
    
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/misc/auerswald.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 6c7f3ef..b5332e6 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -1376,7 +1376,7 @@ static int auerchar_open (struct inode *inode, struct 
file *file)
        }
 
        /* we have access to the device. Now lets allocate memory */
-       ccp = (pauerchar_t) kmalloc(sizeof(auerchar_t), GFP_KERNEL);
+       ccp = kzalloc(sizeof(auerchar_t), GFP_KERNEL);
        if (ccp == NULL) {
                err ("out of memory");
                ret = -ENOMEM;
@@ -1384,7 +1384,6 @@ static int auerchar_open (struct inode *inode, struct 
file *file)
        }
 
        /* Initialize device descriptor */
-       memset( ccp, 0, sizeof(auerchar_t));
        init_MUTEX( &ccp->mutex);
        init_MUTEX( &ccp->readmutex);
         auerbuf_init (&ccp->bufctl);
@@ -1912,14 +1911,13 @@ static int auerswald_probe (struct usb_interface *intf,
                return -ENODEV;
 
        /* allocate memory for our device and initialize it */
-       cp = kmalloc (sizeof(auerswald_t), GFP_KERNEL);
+       cp = kzalloc (sizeof(auerswald_t), GFP_KERNEL);
        if (cp == NULL) {
                err ("out of memory");
                goto pfail;
        }
 
        /* Initialize device descriptor */
-       memset (cp, 0, sizeof(auerswald_t));
        init_MUTEX (&cp->mutex);
        cp->usbdev = usbdev;
        auerchain_init (&cp->controlchain);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to