summaryrefslogtreecommitdiff
path: root/sound/oss/sb_card.c
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2007-02-14 00:33:16 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 08:09:54 -0800
commit3159f06dc2303630c02d1ad2eeaeaf341414c9df (patch)
tree678779f605dac635df3932381933b3950a0052ba /sound/oss/sb_card.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/sb_card.c')
-rw-r--r--sound/oss/sb_card.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c
index 8666291c0052..27acd6f29b98 100644
--- a/sound/oss/sb_card.c
+++ b/sound/oss/sb_card.c
@@ -137,11 +137,10 @@ static int __init sb_init_legacy(void)
{
struct sb_module_options sbmo = {0};
- if((legacy = kmalloc(sizeof(struct sb_card_config), GFP_KERNEL)) == NULL) {
+ if((legacy = kzalloc(sizeof(struct sb_card_config), GFP_KERNEL)) == NULL) {
printk(KERN_ERR "sb: Error: Could not allocate memory\n");
return -ENOMEM;
}
- memset(legacy, 0, sizeof(struct sb_card_config));
legacy->conf.io_base = io;
legacy->conf.irq = irq;
@@ -247,11 +246,10 @@ static int sb_pnp_probe(struct pnp_card_link *card, const struct pnp_card_device
return -EBUSY;
}
- if((scc = kmalloc(sizeof(struct sb_card_config), GFP_KERNEL)) == NULL) {
+ if((scc = kzalloc(sizeof(struct sb_card_config), GFP_KERNEL)) == NULL) {
printk(KERN_ERR "sb: Error: Could not allocate memory\n");
return -ENOMEM;
}
- memset(scc, 0, sizeof(struct sb_card_config));
printk(KERN_INFO "sb: PnP: Found Card Named = \"%s\", Card PnP id = " \
"%s, Device PnP id = %s\n", card->card->name, card_id->id,