summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mic/host
diff options
context:
space:
mode:
authorHuang Zijiang <huang.zijiang@zte.com.cn>2020-02-12 17:54:07 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-14 09:16:03 -0800
commit06e33595e96f212811066df192ae8bf802174296 (patch)
treea1c0a7ebc534dc4597dbd73f45266fe1ffb22e4d /drivers/misc/mic/host
parent1031eb90c17700d1fd1df6d720afbadcd5768b11 (diff)
downloadlinux-stable-06e33595e96f212811066df192ae8bf802174296.tar.gz
linux-stable-06e33595e96f212811066df192ae8bf802174296.tar.bz2
linux-stable-06e33595e96f212811066df192ae8bf802174296.zip
misc: Use kzalloc() instead of kmalloc() with flag GFP_ZERO.
Use kzalloc instead of manually setting kmalloc with flag GFP_ZERO since kzalloc sets allocated memory to zero. Signed-off-by: Huang Zijiang <huang.zijiang@zte.com.cn> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn> Link: https://lore.kernel.org/r/1581501247-5479-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic/host')
-rw-r--r--drivers/misc/mic/host/mic_boot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mic/host/mic_boot.c b/drivers/misc/mic/host/mic_boot.c
index 4f2d9212432c..fb5b3989753d 100644
--- a/drivers/misc/mic/host/mic_boot.c
+++ b/drivers/misc/mic/host/mic_boot.c
@@ -137,7 +137,7 @@ static void *__mic_dma_alloc(struct device *dev, size_t size,
struct scif_hw_dev *scdev = dev_get_drvdata(dev);
struct mic_device *mdev = scdev_to_mdev(scdev);
dma_addr_t tmp;
- void *va = kmalloc(size, gfp | __GFP_ZERO);
+ void *va = kzalloc(size, gfp);
if (va) {
tmp = mic_map_single(mdev, va, size);