X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=sound%2Foss%2Fsb_card.c;h=7de18b58f2cd8b3e05895ff33bd27aba607102db;hb=12323321f004c9e83061c9a9d06046b050d6d4c7;hp=8666291c00523fccca590df1d6a5fbedbf6c28c7;hpb=b20e481ab595e9667c33e2393bdfe9a31870d11f;p=linux-2.6-omap-h63xx.git diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c index 8666291c005..7de18b58f2c 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, @@ -292,7 +290,7 @@ static struct pnp_card_driver sb_pnp_driver = { MODULE_DEVICE_TABLE(pnp_card, sb_pnp_card_table); #endif /* CONFIG_PNP */ -static void __init_or_module sb_unregister_all(void) +static void sb_unregister_all(void) { #ifdef CONFIG_PNP if (pnp_registered)