diff options
Diffstat (limited to 'arch/i386/kernel/mca.c')
-rw-r--r-- | arch/i386/kernel/mca.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/i386/kernel/mca.c b/arch/i386/kernel/mca.c index eb57a851789d..b83672b89527 100644 --- a/arch/i386/kernel/mca.c +++ b/arch/i386/kernel/mca.c | |||
@@ -283,10 +283,9 @@ static int __init mca_init(void) | |||
283 | bus->f.mca_transform_memory = mca_dummy_transform_memory; | 283 | bus->f.mca_transform_memory = mca_dummy_transform_memory; |
284 | 284 | ||
285 | /* get the motherboard device */ | 285 | /* get the motherboard device */ |
286 | mca_dev = kmalloc(sizeof(struct mca_device), GFP_KERNEL); | 286 | mca_dev = kzalloc(sizeof(struct mca_device), GFP_KERNEL); |
287 | if(unlikely(!mca_dev)) | 287 | if(unlikely(!mca_dev)) |
288 | goto out_nomem; | 288 | goto out_nomem; |
289 | memset(mca_dev, 0, sizeof(struct mca_device)); | ||
290 | 289 | ||
291 | /* | 290 | /* |
292 | * We do not expect many MCA interrupts during initialization, | 291 | * We do not expect many MCA interrupts during initialization, |
@@ -310,11 +309,9 @@ static int __init mca_init(void) | |||
310 | mca_dev->slot = MCA_MOTHERBOARD; | 309 | mca_dev->slot = MCA_MOTHERBOARD; |
311 | mca_register_device(MCA_PRIMARY_BUS, mca_dev); | 310 | mca_register_device(MCA_PRIMARY_BUS, mca_dev); |
312 | 311 | ||
313 | mca_dev = kmalloc(sizeof(struct mca_device), GFP_ATOMIC); | 312 | mca_dev = kzalloc(sizeof(struct mca_device), GFP_ATOMIC); |
314 | if(unlikely(!mca_dev)) | 313 | if(unlikely(!mca_dev)) |
315 | goto out_unlock_nomem; | 314 | goto out_unlock_nomem; |
316 | memset(mca_dev, 0, sizeof(struct mca_device)); | ||
317 | |||
318 | 315 | ||
319 | /* Put motherboard into video setup mode, read integrated video | 316 | /* Put motherboard into video setup mode, read integrated video |
320 | * POS registers, and turn motherboard setup off. | 317 | * POS registers, and turn motherboard setup off. |
@@ -349,10 +346,9 @@ static int __init mca_init(void) | |||
349 | } | 346 | } |
350 | if(which_scsi) { | 347 | if(which_scsi) { |
351 | /* found a scsi card */ | 348 | /* found a scsi card */ |
352 | mca_dev = kmalloc(sizeof(struct mca_device), GFP_ATOMIC); | 349 | mca_dev = kzalloc(sizeof(struct mca_device), GFP_ATOMIC); |
353 | if(unlikely(!mca_dev)) | 350 | if(unlikely(!mca_dev)) |
354 | goto out_unlock_nomem; | 351 | goto out_unlock_nomem; |
355 | memset(mca_dev, 0, sizeof(struct mca_device)); | ||
356 | 352 | ||
357 | for(j = 0; j < 8; j++) | 353 | for(j = 0; j < 8; j++) |
358 | mca_dev->pos[j] = pos[j]; | 354 | mca_dev->pos[j] = pos[j]; |
@@ -378,10 +374,9 @@ static int __init mca_init(void) | |||
378 | if(!mca_read_and_store_pos(pos)) | 374 | if(!mca_read_and_store_pos(pos)) |
379 | continue; | 375 | continue; |
380 | 376 | ||
381 | mca_dev = kmalloc(sizeof(struct mca_device), GFP_ATOMIC); | 377 | mca_dev = kzalloc(sizeof(struct mca_device), GFP_ATOMIC); |
382 | if(unlikely(!mca_dev)) | 378 | if(unlikely(!mca_dev)) |
383 | goto out_unlock_nomem; | 379 | goto out_unlock_nomem; |
384 | memset(mca_dev, 0, sizeof(struct mca_device)); | ||
385 | 380 | ||
386 | for(j=0; j<8; j++) | 381 | for(j=0; j<8; j++) |
387 | mca_dev->pos[j]=pos[j]; | 382 | mca_dev->pos[j]=pos[j]; |