aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/ac97_codec.c
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2007-02-14 03:33:16 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 11:09:54 -0500
commit3159f06dc2303630c02d1ad2eeaeaf341414c9df (patch)
tree678779f605dac635df3932381933b3950a0052ba /sound/oss/ac97_codec.c
parentcd354f1ae75e6466a7e31b727faede57a1f89ca5 (diff)
[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>
Diffstat (limited to 'sound/oss/ac97_codec.c')
-rw-r--r--sound/oss/ac97_codec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/oss/ac97_codec.c b/sound/oss/ac97_codec.c
index 602db497929a..fef56cac06c8 100644
--- a/sound/oss/ac97_codec.c
+++ b/sound/oss/ac97_codec.c
@@ -744,11 +744,10 @@ static int ac97_check_modem(struct ac97_codec *codec)
744 744
745struct ac97_codec *ac97_alloc_codec(void) 745struct ac97_codec *ac97_alloc_codec(void)
746{ 746{
747 struct ac97_codec *codec = kmalloc(sizeof(struct ac97_codec), GFP_KERNEL); 747 struct ac97_codec *codec = kzalloc(sizeof(struct ac97_codec), GFP_KERNEL);
748 if(!codec) 748 if(!codec)
749 return NULL; 749 return NULL;
750 750
751 memset(codec, 0, sizeof(*codec));
752 spin_lock_init(&codec->lock); 751 spin_lock_init(&codec->lock);
753 INIT_LIST_HEAD(&codec->list); 752 INIT_LIST_HEAD(&codec->list);
754 return codec; 753 return codec;