提交 f950bc78 编写于 作者: H Himanshu Jha 提交者: Bartlomiej Zolnierkiewicz

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: NLuis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: NHimanshu Jha <himanshujha199640@gmail.com>
[b.zolnierkie: fixed minor issues in the patch description]
Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
上级 7b9faf5d
...@@ -1056,13 +1056,12 @@ int auok190x_common_probe(struct platform_device *pdev, ...@@ -1056,13 +1056,12 @@ int auok190x_common_probe(struct platform_device *pdev,
/* videomemory handling */ /* videomemory handling */
videomemorysize = roundup((panel->w * panel->h) * 2, PAGE_SIZE); videomemorysize = roundup((panel->w * panel->h) * 2, PAGE_SIZE);
videomemory = vmalloc(videomemorysize); videomemory = vzalloc(videomemorysize);
if (!videomemory) { if (!videomemory) {
ret = -ENOMEM; ret = -ENOMEM;
goto err_irq; goto err_irq;
} }
memset(videomemory, 0, videomemorysize);
info->screen_base = (char *)videomemory; info->screen_base = (char *)videomemory;
info->fix.smem_len = videomemorysize; info->fix.smem_len = videomemorysize;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册