[PATCH] OSS: replace kmalloc()+memset() combos with kzalloc()

Replace kmalloc() + memset() pairs with the appropriate kzalloc() calls.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Robert P. J. Day
2007-02-14 00:33:16 -08:00
committed by Linus Torvalds
parent cd354f1ae7
commit 3159f06dc2
19 changed files with 32 additions and 65 deletions

View File

@@ -744,11 +744,10 @@ static int ac97_check_modem(struct ac97_codec *codec)
struct ac97_codec *ac97_alloc_codec(void)
{
struct ac97_codec *codec = kmalloc(sizeof(struct ac97_codec), GFP_KERNEL);
struct ac97_codec *codec = kzalloc(sizeof(struct ac97_codec), GFP_KERNEL);
if(!codec)
return NULL;
memset(codec, 0, sizeof(*codec));
spin_lock_init(&codec->lock);
INIT_LIST_HEAD(&codec->list);
return codec;