diff options
Diffstat (limited to 'drivers/video/au1100fb.c')
-rw-r--r-- | drivers/video/au1100fb.c | 6 |
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) return -EINVAL; /* Allocate new device private */ - if (!(fbdev = kmalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) { + if (!(fbdev = kzalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) { print_err("fail to allocate device private record"); return -ENOMEM; } - memset((void*)fbdev, 0, sizeof(struct au1100fb_device)); fbdev->panel = &known_lcd_panels[drv_info.panel_idx]; @@ -549,10 +548,9 @@ int au1100fb_drv_probe(struct device *dev) fbdev->info.fbops = &au1100fb_ops; fbdev->info.fix = au1100fb_fix; - if (!(fbdev->info.pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL))) { + if (!(fbdev->info.pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL))) { return -ENOMEM; } - memset(fbdev->info.pseudo_palette, 0, sizeof(u32) * 16); if (fb_alloc_cmap(&fbdev->info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) < 0) { print_err("Fail to allocate colormap (%d entries)", |