diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-02-12 03:55:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:43 -0500 |
commit | f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0 (patch) | |
tree | f4ff35f5991debf0f892794687abc574cdaacb4f /drivers/video/igafb.c | |
parent | c4f28e54d61278203c2bb2aea0679e0a738235d2 (diff) |
[PATCH] Video: fb, kzalloc changes
Use kzalloc instead of kmalloc + memset(0).
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 | */ |