diff options
Diffstat (limited to 'drivers/video/igafb.c')
-rw-r--r-- | drivers/video/igafb.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c index 51355c8885aa..90592fb59156 100644 --- a/drivers/video/igafb.c +++ b/drivers/video/igafb.c | |||
@@ -401,12 +401,11 @@ int __init igafb_init(void) | |||
401 | 401 | ||
402 | size = sizeof(struct fb_info) + sizeof(struct iga_par) + sizeof(u32)*16; | 402 | size = sizeof(struct fb_info) + sizeof(struct iga_par) + sizeof(u32)*16; |
403 | 403 | ||
404 | info = kmalloc(size, GFP_ATOMIC); | 404 | info = kzalloc(size, GFP_ATOMIC); |
405 | if (!info) { | 405 | if (!info) { |
406 | printk("igafb_init: can't alloc fb_info\n"); | 406 | printk("igafb_init: can't alloc fb_info\n"); |
407 | return -ENOMEM; | 407 | return -ENOMEM; |
408 | } | 408 | } |
409 | memset(info, 0, size); | ||
410 | 409 | ||
411 | par = (struct iga_par *) (info + 1); | 410 | par = (struct iga_par *) (info + 1); |
412 | 411 | ||
@@ -465,7 +464,7 @@ int __init igafb_init(void) | |||
465 | * one additional region with size == 0. | 464 | * one additional region with size == 0. |
466 | */ | 465 | */ |
467 | 466 | ||
468 | par->mmap_map = kmalloc(4 * sizeof(*par->mmap_map), GFP_ATOMIC); | 467 | par->mmap_map = kzalloc(4 * sizeof(*par->mmap_map), GFP_ATOMIC); |
469 | if (!par->mmap_map) { | 468 | if (!par->mmap_map) { |
470 | printk("igafb_init: can't alloc mmap_map\n"); | 469 | printk("igafb_init: can't alloc mmap_map\n"); |
471 | iounmap((void *)par->io_base); | 470 | iounmap((void *)par->io_base); |
@@ -474,8 +473,6 @@ int __init igafb_init(void) | |||
474 | return -ENOMEM; | 473 | return -ENOMEM; |
475 | } | 474 | } |
476 | 475 | ||
477 | memset(par->mmap_map, 0, 4 * sizeof(*par->mmap_map)); | ||
478 | |||
479 | /* | 476 | /* |
480 | * Set default vmode and cmode from PROM properties. | 477 | * Set default vmode and cmode from PROM properties. |
481 | */ | 478 | */ |