Skip to content

Commit

Permalink
fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
vapier authored and torvalds committed Jun 17, 2009
1 parent 8f09d74 commit a34601c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/video/bf54x-lq043fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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
Expand Down

0 comments on commit a34601c

Please sign in to comment.