From 2a38d2a8b4a6777d37b7b8b8416b60fe0af73cd2 Mon Sep 17 00:00:00 2001 From: Yang Yingliang Date: Tue, 18 May 2021 21:20:18 +0800 Subject: [PATCH] scsi: qedf: Use vzalloc() instead of vmalloc()/memset(0) Use vzalloc() instead of vmalloc() and memset(0) to simpify the code. Link: https://lore.kernel.org/r/20210518132018.1312995-1-yangyingliang@huawei.com Reviewed-by: Himanshu Madhani Signed-off-by: Yang Yingliang Signed-off-by: Martin K. Petersen --- drivers/scsi/qedf/qedf_dbg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qedf/qedf_dbg.c b/drivers/scsi/qedf/qedf_dbg.c index e0387e4..0d2aed8 100644 --- a/drivers/scsi/qedf/qedf_dbg.c +++ b/drivers/scsi/qedf/qedf_dbg.c @@ -106,11 +106,10 @@ ret: int qedf_alloc_grc_dump_buf(u8 **buf, uint32_t len) { - *buf = vmalloc(len); + *buf = vzalloc(len); if (!(*buf)) return -ENOMEM; - memset(*buf, 0, len); return 0; } -- 2.7.4