diff mbox series

[-next] scsi: qedf: use vzalloc() instead of vmalloc() and memset(0)

Message ID 20200916062136.191141-1-miaoqinglang@huawei.com
State Deferred
Headers show
Series [-next] scsi: qedf: use vzalloc() instead of vmalloc() and memset(0) | expand

Commit Message

Qinglang Miao Sept. 16, 2020, 6:21 a.m. UTC
Use vzalloc() instead of vmalloc() and memset(0) to clean the code.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/scsi/qedf/qedf_dbg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/qedf/qedf_dbg.c b/drivers/scsi/qedf/qedf_dbg.c
index e0387e495..0d2aed828 100644
--- a/drivers/scsi/qedf/qedf_dbg.c
+++ b/drivers/scsi/qedf/qedf_dbg.c
@@ -106,11 +106,10 @@  qedf_dbg_info(struct qedf_dbg_ctx *qedf, const char *func, u32 line,
 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;
 }