X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=sound%2Foss%2Fsb_card.c;h=27acd6f29b98ffe06e4ffddd737e2d49218ce7c3;hb=920841d8d1d61bc12b43f95a579a5374f6d98f81;hp=d38e88abc8fac32510159d8d885e6cb78ad2d3fa;hpb=fdccffc6b711d1bfcd1e1b569537686dcad423e2;p=mv-sheeva.git diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c index d38e88abc8f..27acd6f29b9 100644 --- a/sound/oss/sb_card.c +++ b/sound/oss/sb_card.c @@ -22,7 +22,6 @@ * 02-07-2003 Bug made it into first release. Take two. */ -#include #include #include #include @@ -138,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; @@ -248,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, @@ -348,10 +345,8 @@ static void __exit sb_exit(void) sb_unregister_all(); - if (smw_free) { - vfree(smw_free); - smw_free = NULL; - } + vfree(smw_free); + smw_free = NULL; } module_init(sb_init);