aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/eisa
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/eisa')
-rw-r--r--drivers/eisa/eisa-bus.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c
index 1937743c8e29..4196137e66de 100644
--- a/drivers/eisa/eisa-bus.c
+++ b/drivers/eisa/eisa-bus.c
@@ -281,13 +281,11 @@ static int __init eisa_probe (struct eisa_root_device *root)
281 /* First try to get hold of slot 0. If there is no device 281 /* First try to get hold of slot 0. If there is no device
282 * here, simply fail, unless root->force_probe is set. */ 282 * here, simply fail, unless root->force_probe is set. */
283 283
284 if (!(edev = kmalloc (sizeof (*edev), GFP_KERNEL))) { 284 if (!(edev = kzalloc (sizeof (*edev), GFP_KERNEL))) {
285 printk (KERN_ERR "EISA: Couldn't allocate mainboard slot\n"); 285 printk (KERN_ERR "EISA: Couldn't allocate mainboard slot\n");
286 return -ENOMEM; 286 return -ENOMEM;
287 } 287 }
288 288
289 memset (edev, 0, sizeof (*edev));
290
291 if (eisa_request_resources (root, edev, 0)) { 289 if (eisa_request_resources (root, edev, 0)) {
292 printk (KERN_WARNING \ 290 printk (KERN_WARNING \
293 "EISA: Cannot allocate resource for mainboard\n"); 291 "EISA: Cannot allocate resource for mainboard\n");
@@ -317,13 +315,11 @@ static int __init eisa_probe (struct eisa_root_device *root)
317 force_probe: 315 force_probe:
318 316
319 for (c = 0, i = 1; i <= root->slots; i++) { 317 for (c = 0, i = 1; i <= root->slots; i++) {
320 if (!(edev = kmalloc (sizeof (*edev), GFP_KERNEL))) { 318 if (!(edev = kzalloc (sizeof (*edev), GFP_KERNEL))) {
321 printk (KERN_ERR "EISA: Out of memory for slot %d\n", 319 printk (KERN_ERR "EISA: Out of memory for slot %d\n",
322 i); 320 i);
323 continue; 321 continue;
324 } 322 }
325
326 memset (edev, 0, sizeof (*edev));
327 323
328 if (eisa_request_resources (root, edev, i)) { 324 if (eisa_request_resources (root, edev, i)) {
329 printk (KERN_WARNING \ 325 printk (KERN_WARNING \