aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/sb_card.c
diff options
context:
space:
mode:
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)
137{ 137{
138 struct sb_module_options sbmo = {0}; 138 struct sb_module_options sbmo = {0};
139 139
140 if((legacy = kmalloc(sizeof(struct sb_card_config), GFP_KERNEL)) == NULL) { 140 if((legacy = kzalloc(sizeof(struct sb_card_config), GFP_KERNEL)) == NULL) {
141 printk(KERN_ERR "sb: Error: Could not allocate memory\n"); 141 printk(KERN_ERR "sb: Error: Could not allocate memory\n");
142 return -ENOMEM; 142 return -ENOMEM;
143 } 143 }
144 memset(legacy, 0, sizeof(struct sb_card_config));
145 144
146 legacy->conf.io_base = io; 145 legacy->conf.io_base = io;
147 legacy->conf.irq = irq; 146 legacy->conf.irq = irq;
@@ -247,11 +246,10 @@ static int sb_pnp_probe(struct pnp_card_link *card, const struct pnp_card_device
247 return -EBUSY; 246 return -EBUSY;
248 } 247 }
249 248
250 if((scc = kmalloc(sizeof(struct sb_card_config), GFP_KERNEL)) == NULL) { 249 if((scc = kzalloc(sizeof(struct sb_card_config), GFP_KERNEL)) == NULL) {
251 printk(KERN_ERR "sb: Error: Could not allocate memory\n"); 250 printk(KERN_ERR "sb: Error: Could not allocate memory\n");
252 return -ENOMEM; 251 return -ENOMEM;
253 } 252 }
254 memset(scc, 0, sizeof(struct sb_card_config));
255 253
256 printk(KERN_INFO "sb: PnP: Found Card Named = \"%s\", Card PnP id = " \ 254 printk(KERN_INFO "sb: PnP: Found Card Named = \"%s\", Card PnP id = " \
257 "%s, Device PnP id = %s\n", card->card->name, card_id->id, 255 "%s, Device PnP id = %s\n", card->card->name, card_id->id,