From: Mike Frysinger Date: Tue, 16 Jun 2009 22:34:43 +0000 (-0700) Subject: fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a34601c5d84134055782ee031d58d82f5440e918;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset Signed-off-by: Mike Frysinger Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c index 8aa67dea06db..e49ae5edcc00 100644 --- a/drivers/video/bf54x-lq043fb.c +++ b/drivers/video/bf54x-lq043fb.c @@ -630,7 +630,7 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev) fbinfo->fbops = &bfin_bf54x_fb_ops; - fbinfo->pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL); + fbinfo->pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL); if (!fbinfo->pseudo_palette) { printk(KERN_ERR DRIVER_NAME "Fail to allocate pseudo_palette\n"); @@ -639,8 +639,6 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev) goto out4; } - memset(fbinfo->pseudo_palette, 0, sizeof(u32) * 16); - if (fb_alloc_cmap(&fbinfo->cmap, BFIN_LCD_NBR_PALETTE_ENTRIES, 0) < 0) { printk(KERN_ERR DRIVER_NAME