Commit 06e33595 authored by Huang Zijiang's avatar Huang Zijiang Committed by Greg Kroah-Hartman

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: default avatarHuang Zijiang <huang.zijiang@zte.com.cn>
Signed-off-by: default avatarYi Wang <wang.yi59@zte.com.cn>
Link: https://lore.kernel.org/r/1581501247-5479-1-git-send-email-wang.yi59@zte.com.cnSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1031eb90
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment