aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/auerswald.c
diff options
context:
space:
mode:
authorBurman Yan <yan_952@hotmail.com>2006-12-04 18:22:40 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-20 13:14:26 -0500
commit66eb2e93b99b79bd3d55ecea2098a8369c1ded0d (patch)
treef85a61dffae942114021ef21a5a67c4f1ea1e242 /drivers/usb/misc/auerswald.c
parent071e0a2aee9c289f50b9329d0c26474ca94f7c7a (diff)
USB AUERSWALD: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/auerswald.c')
-rw-r--r--drivers/usb/misc/auerswald.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 6c7f3efb1d40..b5332e679c46 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)
1376 } 1376 }
1377 1377
1378 /* we have access to the device. Now lets allocate memory */ 1378 /* we have access to the device. Now lets allocate memory */
1379 ccp = (pauerchar_t) kmalloc(sizeof(auerchar_t), GFP_KERNEL); 1379 ccp = kzalloc(sizeof(auerchar_t), GFP_KERNEL);
1380 if (ccp == NULL) { 1380 if (ccp == NULL) {
1381 err ("out of memory"); 1381 err ("out of memory");
1382 ret = -ENOMEM; 1382 ret = -ENOMEM;
@@ -1384,7 +1384,6 @@ static int auerchar_open (struct inode *inode, struct file *file)
1384 } 1384 }
1385 1385
1386 /* Initialize device descriptor */ 1386 /* Initialize device descriptor */
1387 memset( ccp, 0, sizeof(auerchar_t));
1388 init_MUTEX( &ccp->mutex); 1387 init_MUTEX( &ccp->mutex);
1389 init_MUTEX( &ccp->readmutex); 1388 init_MUTEX( &ccp->readmutex);
1390 auerbuf_init (&ccp->bufctl); 1389 auerbuf_init (&ccp->bufctl);
@@ -1912,14 +1911,13 @@ static int auerswald_probe (struct usb_interface *intf,
1912 return -ENODEV; 1911 return -ENODEV;
1913 1912
1914 /* allocate memory for our device and initialize it */ 1913 /* allocate memory for our device and initialize it */
1915 cp = kmalloc (sizeof(auerswald_t), GFP_KERNEL); 1914 cp = kzalloc (sizeof(auerswald_t), GFP_KERNEL);
1916 if (cp == NULL) { 1915 if (cp == NULL) {
1917 err ("out of memory"); 1916 err ("out of memory");
1918 goto pfail; 1917 goto pfail;
1919 } 1918 }
1920 1919
1921 /* Initialize device descriptor */ 1920 /* Initialize device descriptor */
1922 memset (cp, 0, sizeof(auerswald_t));
1923 init_MUTEX (&cp->mutex); 1921 init_MUTEX (&cp->mutex);
1924 cp->usbdev = usbdev; 1922 cp->usbdev = usbdev;
1925 auerchain_init (&cp->controlchain); 1923 auerchain_init (&cp->controlchain);