Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66eb2e93 authored by Burman Yan's avatar Burman Yan Committed by Greg Kroah-Hartman
Browse files

USB AUERSWALD: replace kmalloc+memset with kzalloc



Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 071e0a2a
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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);