From: Himanshu Jha Date: Thu, 4 Jan 2018 15:53:50 +0000 (+0100) Subject: fbdev: auo_k190x: Use zeroing memory allocator instead of allocator/memset X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f950bc7880b31cfede87d99fbc4fd4d2b40914c5;p=openwrt%2Fstaging%2Fblogic.git fbdev: auo_k190x: Use zeroing memory allocator instead of allocator/memset Use vzalloc for allocating zeroed memory and remove unnecessary memset function. Done using Coccinelle. Generated-by scripts/coccinelle/api/alloc/kzalloc-simple.cocci. 0-day tested with no failures. Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha [b.zolnierkie: fixed minor issues in the patch description] Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/video/fbdev/auo_k190x.c b/drivers/video/fbdev/auo_k190x.c index 0d06038324e0..b8894013014b 100644 --- a/drivers/video/fbdev/auo_k190x.c +++ b/drivers/video/fbdev/auo_k190x.c @@ -1056,13 +1056,12 @@ int auok190x_common_probe(struct platform_device *pdev, /* videomemory handling */ videomemorysize = roundup((panel->w * panel->h) * 2, PAGE_SIZE); - videomemory = vmalloc(videomemorysize); + videomemory = vzalloc(videomemorysize); if (!videomemory) { ret = -ENOMEM; goto err_irq; } - memset(videomemory, 0, videomemorysize); info->screen_base = (char *)videomemory; info->fix.smem_len = videomemorysize;