aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/sb_card.c
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2007-02-14 03:33:16 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 11:09:54 -0500
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)
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,