From 3159f06dc2303630c02d1ad2eeaeaf341414c9df Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Wed, 14 Feb 2007 00:33:16 -0800 Subject: [PATCH] OSS: replace kmalloc()+memset() combos with kzalloc() Replace kmalloc() + memset() pairs with the appropriate kzalloc() calls. Signed-off-by: Robert P. J. Day Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/sb_card.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sound/oss/sb_card.c') diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c index 8666291c005..27acd6f29b9 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, -- cgit v1.2.3