From: "Burman Yan" <yan_952@hotmail.com>
To: linux-kernel@vger.kernel.org
Cc: trivial@kernel.org, wolfgang@iksw-muees.de
Subject: [PATCH 2.6.19-rc6] USB AUERSWALD: replace kmalloc+memset with kzalloc
Date: Wed, 22 Nov 2006 21:00:08 +0200 [thread overview]
Message-ID: <BAY20-F249DFEB9C67DC4ECE4CA7ED8E30@phx.gbl> (raw)
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
Hi.
This patch replaces kmalloc+memset with kzalloc in USB AUERSWALD driver.
Regards
Yan Burman
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
[-- Attachment #2: kzalloc_usb_auerswald.patch --]
[-- Type: application/octet-stream, Size: 1413 bytes --]
Replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <yan_952@hotmail.com>
diff -rubp linux-2.6.19-rc5_orig/drivers/usb/misc/auerswald.c linux-2.6.19-rc5_kzalloc/drivers/usb/misc/auerswald.c
--- linux-2.6.19-rc5_orig/drivers/usb/misc/auerswald.c 2006-11-09 12:16:21.000000000 +0200
+++ linux-2.6.19-rc5_kzalloc/drivers/usb/misc/auerswald.c 2006-11-11 22:44:18.000000000 +0200
@@ -1379,7 +1379,7 @@ static int auerchar_open (struct inode *
}
/* 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;
@@ -1387,7 +1387,6 @@ static int auerchar_open (struct inode *
}
/* Initialize device descriptor */
- memset( ccp, 0, sizeof(auerchar_t));
init_MUTEX( &ccp->mutex);
init_MUTEX( &ccp->readmutex);
auerbuf_init (&ccp->bufctl);
@@ -1915,14 +1914,13 @@ static int auerswald_probe (struct usb_i
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);
reply other threads:[~2006-11-22 19:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY20-F249DFEB9C67DC4ECE4CA7ED8E30@phx.gbl \
--to=yan_952@hotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@kernel.org \
--cc=wolfgang@iksw-muees.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®