aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/au1200fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/au1200fb.c')
-rw-r--r--drivers/video/au1200fb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c
index dbf4ec3f6d57..03e57ef88378 100644
--- a/drivers/video/au1200fb.c
+++ b/drivers/video/au1200fb.c
@@ -1589,11 +1589,10 @@ static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev)
1589 return -EFAULT; 1589 return -EFAULT;
1590 } 1590 }
1591 1591
1592 fbi->pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL); 1592 fbi->pseudo_palette = kcalloc(16, sizeof(u32), GFP_KERNEL);
1593 if (!fbi->pseudo_palette) { 1593 if (!fbi->pseudo_palette) {
1594 return -ENOMEM; 1594 return -ENOMEM;
1595 } 1595 }
1596 memset(fbi->pseudo_palette, 0, sizeof(u32) * 16);
1597 1596
1598 if (fb_alloc_cmap(&fbi->cmap, AU1200_LCD_NBR_PALETTE_ENTRIES, 0) < 0) { 1597 if (fb_alloc_cmap(&fbi->cmap, AU1200_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
1599 print_err("Fail to allocate colormap (%d entries)", 1598 print_err("Fail to allocate colormap (%d entries)",