diff options
author | Himanshu Jha <himanshujha199640@gmail.com> | 2018-01-04 10:53:50 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2018-01-04 10:53:50 -0500 |
commit | f950bc7880b31cfede87d99fbc4fd4d2b40914c5 (patch) | |
tree | 4560702dea9709cbcc2a8806e8dbd4ac7d28535d | |
parent | 7b9faf5df0ac495a1a3d7cdb64921c179f9008ac (diff) |
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 <mcgrof@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
[b.zolnierkie: fixed minor issues in the patch description]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
-rw-r--r-- | drivers/video/fbdev/auo_k190x.c | 3 |
1 files changed, 1 insertions, 2 deletions
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, | |||
1056 | /* videomemory handling */ | 1056 | /* videomemory handling */ |
1057 | 1057 | ||
1058 | videomemorysize = roundup((panel->w * panel->h) * 2, PAGE_SIZE); | 1058 | videomemorysize = roundup((panel->w * panel->h) * 2, PAGE_SIZE); |
1059 | videomemory = vmalloc(videomemorysize); | 1059 | videomemory = vzalloc(videomemorysize); |
1060 | if (!videomemory) { | 1060 | if (!videomemory) { |
1061 | ret = -ENOMEM; | 1061 | ret = -ENOMEM; |
1062 | goto err_irq; | 1062 | goto err_irq; |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | memset(videomemory, 0, videomemorysize); | ||
1066 | info->screen_base = (char *)videomemory; | 1065 | info->screen_base = (char *)videomemory; |
1067 | info->fix.smem_len = videomemorysize; | 1066 | info->fix.smem_len = videomemorysize; |
1068 | 1067 | ||