fbdev: auo_k190x: Use zeroing memory allocator instead of allocator/memset

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/f950bc7880b31cfede87d99fbc4fd4d2b40914c5
Commit:     f950bc7880b31cfede87d99fbc4fd4d2b40914c5
Parent:     7b9faf5df0ac495a1a3d7cdb64921c179f9008ac
Refname:    refs/heads/master
Author:     Himanshu Jha <[email protected]>
AuthorDate: Thu Jan 4 16:53:50 2018 +0100
Committer:  Bartlomiej Zolnierkiewicz <[email protected]>
CommitDate: Thu Jan 4 16:53:50 2018 +0100

    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 <[email protected]>
    Signed-off-by: Himanshu Jha <[email protected]>
    [b.zolnierkie: fixed minor issues in the patch description]
    Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
---
 drivers/video/fbdev/auo_k190x.c | 3 +--
 1 file changed, 1 insertion(+), 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,
 	/* 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;
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.