aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/au1100fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/au1100fb.c')
-rw-r--r--drivers/video/au1100fb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
index ef5c16f7f5a6..80a81eccad36 100644
--- a/drivers/video/au1100fb.c
+++ b/drivers/video/au1100fb.c
@@ -468,11 +468,10 @@ int au1100fb_drv_probe(struct device *dev)
468 return -EINVAL; 468 return -EINVAL;
469 469
470 /* Allocate new device private */ 470 /* Allocate new device private */
471 if (!(fbdev = kmalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) { 471 if (!(fbdev = kzalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) {
472 print_err("fail to allocate device private record"); 472 print_err("fail to allocate device private record");
473 return -ENOMEM; 473 return -ENOMEM;
474 } 474 }
475 memset((void*)fbdev, 0, sizeof(struct au1100fb_device));
476 475
477 fbdev->panel = &known_lcd_panels[drv_info.panel_idx]; 476 fbdev->panel = &known_lcd_panels[drv_info.panel_idx];
478 477
@@ -549,10 +548,9 @@ int au1100fb_drv_probe(struct device *dev)
549 fbdev->info.fbops = &au1100fb_ops; 548 fbdev->info.fbops = &au1100fb_ops;
550 fbdev->info.fix = au1100fb_fix; 549 fbdev->info.fix = au1100fb_fix;
551 550
552 if (!(fbdev->info.pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL))) { 551 if (!(fbdev->info.pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL))) {
553 return -ENOMEM; 552 return -ENOMEM;
554 } 553 }
555 memset(fbdev->info.pseudo_palette, 0, sizeof(u32) * 16);
556 554
557 if (fb_alloc_cmap(&fbdev->info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) < 0) { 555 if (fb_alloc_cmap(&fbdev->info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
558 print_err("Fail to allocate colormap (%d entries)", 556 print_err("Fail to allocate colormap (%d entries)",