aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/igafb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/igafb.c')
-rw-r--r--drivers/video/igafb.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index 51355c8885a..90592fb5915 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -401,12 +401,11 @@ int __init igafb_init(void)
size = sizeof(struct fb_info) + sizeof(struct iga_par) + sizeof(u32)*16;
- info = kmalloc(size, GFP_ATOMIC);
+ info = kzalloc(size, GFP_ATOMIC);
if (!info) {
printk("igafb_init: can't alloc fb_info\n");
return -ENOMEM;
}
- memset(info, 0, size);
par = (struct iga_par *) (info + 1);
@@ -465,7 +464,7 @@ int __init igafb_init(void)
* one additional region with size == 0.
*/
- par->mmap_map = kmalloc(4 * sizeof(*par->mmap_map), GFP_ATOMIC);
+ par->mmap_map = kzalloc(4 * sizeof(*par->mmap_map), GFP_ATOMIC);
if (!par->mmap_map) {
printk("igafb_init: can't alloc mmap_map\n");
iounmap((void *)par->io_base);
@@ -474,8 +473,6 @@ int __init igafb_init(void)
return -ENOMEM;
}
- memset(par->mmap_map, 0, 4 * sizeof(*par->mmap_map));
-
/*
* Set default vmode and cmode from PROM properties.
*/