提交 a34601c5 编写于 作者: M Mike Frysinger 提交者: Linus Torvalds

fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset

Signed-off-by: NMike Frysinger <vapier@gentoo.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8f09d74a
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册