diff options
author | Robert P. J. Day <rpjday@mindspring.com> | 2007-02-14 03:33:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-14 11:09:54 -0500 |
commit | 3159f06dc2303630c02d1ad2eeaeaf341414c9df (patch) | |
tree | 678779f605dac635df3932381933b3950a0052ba /sound/oss/hal2.c | |
parent | cd354f1ae75e6466a7e31b727faede57a1f89ca5 (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/hal2.c')
-rw-r--r-- | sound/oss/hal2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/oss/hal2.c b/sound/oss/hal2.c index 80a42773c648..a94b9df489dc 100644 --- a/sound/oss/hal2.c +++ b/sound/oss/hal2.c | |||
@@ -1435,10 +1435,9 @@ static int hal2_init_card(struct hal2_card **phal2, struct hpc3_regs *hpc3) | |||
1435 | int ret = 0; | 1435 | int ret = 0; |
1436 | struct hal2_card *hal2; | 1436 | struct hal2_card *hal2; |
1437 | 1437 | ||
1438 | hal2 = kmalloc(sizeof(struct hal2_card), GFP_KERNEL); | 1438 | hal2 = kzalloc(sizeof(struct hal2_card), GFP_KERNEL); |
1439 | if (!hal2) | 1439 | if (!hal2) |
1440 | return -ENOMEM; | 1440 | return -ENOMEM; |
1441 | memset(hal2, 0, sizeof(struct hal2_card)); | ||
1442 | 1441 | ||
1443 | hal2->ctl_regs = (struct hal2_ctl_regs *)hpc3->pbus_extregs[0]; | 1442 | hal2->ctl_regs = (struct hal2_ctl_regs *)hpc3->pbus_extregs[0]; |
1444 | hal2->aes_regs = (struct hal2_aes_regs *)hpc3->pbus_extregs[1]; | 1443 | hal2->aes_regs = (struct hal2_aes_regs *)hpc3->pbus_extregs[1]; |